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 a configure a [log4j.properties file] in |
|
Category |
Optional String. |
Optionally specify a category name and configure it in the [log4j.properties file] to behave per your use case. For example, you can route log messages based on category or set log levels based on category. |
|
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 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. |