STUDIO Visual Editor
Field | Value | Description | Example XML |
---|---|---|---|
Display Name |
Logger |
Customize to display a unique name for the logger in your application. |
|
Message |
String or Mule expression |
Specify what Mule should log. By default, messages are logged to the console in Mule Studio. |
|
Level |
Select a level from the listed options:
|
Specify the level at which the message should be logged. By default, Mule Studio will not log messages at the DEBUG or TRACE level to the console unless you create and configure a |
|
Category |
Optional. String |
Optionally specify a category name and configure it in the |
|
XML Editor or Standalone
# A logger set to monitor message processing status
<logger category="monitoring" message="Message #[payload.id] processed successfully" level="INFO" doc:name="Monitoring Logger"/>
# A logger set to record the processing time of a flow
<logger category="performance" message="Message #[payload.id] took #[flowVars['processingTime']] milliseconds to process" level="INFO" doc:name="Performance Logger"/>
Element | Description |
---|---|
logger |
Use the Logger to log messages such as error messages, status notifications, or exceptions to the application’s log file. |
Element Attribute | Description |
---|---|
message |
Specify what Mule should log. Supports expressions. |
level |
Select one of the following levels: ERROR, WARN, INFO, DEBUG, or TRACE. If no level attribute is set, the logger will log at the DEBUG level. |
category |
Optional. Specify categories to route log entries according to business needs. Configure the categories in your Configuring the log4j.properties File. |
doc:name |
Customize to display a unique name for the logger in your application. Note: Attribute not required in Mule Standalone configuration. |
Rather than specifying a single Mule expression in your logger message, you can embed as many expressions as you required for your use case. This allows you to give some context to what is being logged, and enables you to log multiple things at once. For example:
|