Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Table of Contents |
---|
Logging Data
The log
, warn
, and error
built-in functions on the Mez
namespace writes a log message with level INFO, WARNING and SEVERE, respectively. These functions take a string
as parameter, but if it matches a translation key, the translation value will be used. The logging entry is saved in the __logging_log__
table of your application instance's schema. It will also be available via the Logging Service.
Code Block |
---|
Mez:log("Hello, World"); |
Code Block |
---|
Mez:warn("translation.key"); |
Code Block |
---|
Mez:error("Invalid value detected."); |
Displaying Pop-ups
Mez:alert(s)
, Mez:alertWarn(s)
, and Mez:alertError(s)
all displays an alert dialog in the UI with the given message. They differ in text color (blue, orange, and red). These function functions expect a string
containing a translation key as parameter.
Code Block |
---|
Mez:alert("translation.key"); |
Code Block |
---|
Mez:alertWarn("translation.key"); |
Code Block |
---|
Mez:alertError("translatiointranslation.key"); |
Additional Mentions and References
- Using the Logging Service
- Mez BIFs in the Quick Reference
- The last section in Lesson 4 of the Tutorial covers pop-ups
Excerpt | ||
---|---|---|
| ||
Mez namespace | log | alert | warn | error | alertWarn | alertError |