Log external object - Draft

Unofficial Content

Log external object allows the developer to write messages in the log system in different levels, which will go to different streams.

 Log external object - Module  Log external object - Object

Properties

Does not have any.

Methods

All of them allows the developer to indicate a "topic" value with the meaning of the data written.

Write

Writes a message in the log.

Return value  None
Parameters Message:VarChar(1000)[ , topic:VarChar(40) ]

Error

Writes an error message in the log (through the errors flow channel).

Return value  None
Parameters Message:VarChar(1000)[ , topic:VarChar(40) ]

Warning

Writes a warning message in the log (through the warnings flow channel).

Return value  None
Parameters Message:VarChar(1000)[ , topic:VarChar(40) ]

Info

Writes an info message in the log (through the info flow channel).

Return value  None
Parameters Message:VarChar(1000)[ , topic:VarChar(40) ]

Debug

Writes a debug message in the log (through the debug flow channel).

Return value  None
Parameters Message:VarChar(1000)[ , topic:VarChar(40) ]

Events

Does not have any.

Sample

Smart devices

Suppose we have the Default Log Level property set to Warning, and the following code in a client-event:

Event 'WriteAllLogLevels'
    Composite
        &Log.Debug("Debug message","TestSDLoggingDebug")
        &Log.Info("Info message","TestSDLoggingInfo")
        &Log.Warning("Warning message","TestSDLoggingWarning")
        &Log.Error("Error message","TestSDLoggingError")
    EndComposite
Endevent

Then, in Android's LogCat, you will see the following messages (refer to HowTo: Enable logging for Smart Devices).

image_201825144920_1_png

Note that it only displays Warning and Error messages due to the Log Level property. Other messages are ignored (Debug and Info).

Scope

Platforms  Smart Devices (Android, iOS), Web (.NET, Java)

Availability

-

See also