Studio Visual Editor
Properties:
Field | Value | Description | Example |
---|---|---|---|
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. You can create this file automatically through Studio by right-clicking on your project in the package explorer, and selecting Mule > Create Log4j Configuration. Then you can find 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 logs at the INFO level. |
category |
Optional. Specify categories to route log entries according to business needs. Configure the categories in your log4j2.xml file. |
doc:name |
Customize to display a unique name for the logger in your application. Note: Attribute not required in Mule Standalone configuration. |