Log external object allows the developer to write messages in the log system in different levels, which will go to different streams.
Does not have any.
All of them allows the developer to indicate a "topic" value with the meaning of the data written.
Writes a message in the log, and optionally you can indicate a topic and the desired log level.
Writes a fatal message in the log (through the errors flow channel).
Writes an error message in the log (through the errors flow channel).
Writes a warning message in the log (through the warnings flow channel).
Writes an info message in the log (through the info flow channel).
Writes a debug message in the log (through the debug flow channel).
Does not have any.
Enumerated domain with the available log levels. In order of significance:
Suppose you have the Default Log Level property set to "Warning", and the following code in a client-event:
Then, in Android's LogCat, you will see the following messages (refer to HowTo: Enable logging for Smart Devices).
Note that it only displays Warning and Error messages due to the Log Level property. Other messages are ignored (Debug and Info).
Note: Remember that log messages will be displayed on LogCat/XCode in online applications only when the Log external object is executed on client-side events. In such case, The Start, Refresh and Load events will print the log depending on the server-side configuration (as it is shown in the example below).
Suppose you have the User Log level property set to "6.All" and Log output property to "File". Then, if you write an event like this:
Log.Write(!"Write message", !"MyCompany.Test.TestLoggingWrite",LogLEvel.DEBUG)
In the client.log file you will see the following messages:
||Smart Devices (Android, iOS), Web (.NET, Java)
This external object is available as of GeneXus 15 Upgrade 11
When using Modules for sharing GeneXus's interfaces (e.g. an API), it is highly recommended to follow these guidelines.
- Always include a log message on your operations, preferably in English and with no translation (using "!" notation, e.g. !"My log message") to simplify filters and searches.
- Add a topic to each log message indicating which object produce the message. You can use the following convention:
where GeneXus is the company, GeneXus.Common.Notifications is the module (from the root), and SendNotification is the object.
- Use Log API instead of msg("<My message>",status)