Log Message

Last update: Edit

1 Introduction

With the log-message action you can create messages that appear in the log of your Mendix application.

2 Action Properties

2.1 Log Level

The log level defines the severity of the log message. In the modeler console dock, messages have a different color and an icon for some log levels.

Option Icon Description
Trace Used for detailed execution traces.
Debug Used to debug execution.
Info Used to log informative messages.
Warning Used to log warnings. These messages appear in orange.
Error Used to log error messages. These messages appear in red.
Critical Used to log critical errors. These messages appear in white on red .

Default value: Info

2.2 Log Node Name

The log node name is a microflow expression that defines the source of the log message. For example, if you log messages from an email module, the log node name could be ‘Email module’.

2.3 Template

Template defines the text of the message. The template can contain parameters that are written as a number between braces, for example, {1}. The first parameter has number 1, the second 2 etcetera.

2.4 Parameters

For each parameter in the template you define a microflow expression of which the value will be inserted at the position of the parameter. Parameters need to be entered using expressions resulting in a string.

2.5 Include Latest Stack Trace

Defines whether to include the stack trace of the latest error in this log message. In the modeler, log messages that include a stack trace are marked with a paperclip icon:

Double-clicking these log messages shows the stack trace.

This option also applies to $latestSoapFault. If you define an error handler for a web service call, and it catches a soap fault error, checking this box will add the stacktrace to the logline in the modeler.