log
Produces a new entry for the logic log, which is normally filled by commands reporting their problems. The entry is defined by a message and its severity level.
Attributes
message | ||
---|---|---|
Required | Value type | EL-evaluated |
Yes | String | Yes |
Defines the message to be written into the log. |
level | ||
---|---|---|
Required | Value type | EL-evaluated |
No | String | Yes |
The level of the created log entry. Higher level values generally make the entry more visible in the user interface. Possible values for this attribute, from the lowest to the highest, are:
If not defined, the level FINE is used. |
Examples
The log
command is helpful in printing out progress messages as the Flow goes into different paths as well as showing results of expressions. For increased visibility, you can set the level to SEVERE.
<log message="User selected the record ${selectedRecordId}" level="SEVERE">
Do note that some of the more complex kinds of variables, such as Files, do not have a particularly meaningful text representation and using them in the expressions may not be very useful. If you'd like to specifically inspect expression results, the logVar command may be more helpful as it also tells the type of the resulting variable.
You can also easily test conditional expressions. The expression will be displayed as either "true" or "false".
<log message="someMap has content: ${not empty someMap}" level="SEVERE">