Log Flow Information at Runtime with Logger (Flow Designer)
You add one or more Logger core components to a flow to log information from the flow at runtime. Logging information is helpful for troubleshooting and taking a quick look at the output at some point in the flow. You can use expressions to create the log message. The following table lists some examples.
Expression | Description |
---|---|
|
The full contents of the payload. |
|
The value of "id", a child element of "user" in the payload |
|
The value of an attribute named "myAttribute" |
|
The value of a variable named myVariable |
|
Some static text concatenated with the value of "id". |
|
The value of "name", a child element of "user" in the payload, converted to upper case characters. |
To view logs, you expand the area at the bottom of Flow Designer:
-
Add a Logger core component to your flow.
-
In Message, click Function to use an expression.
If you just want to log static text, do not click Function. Just type the text.
-
Type an expression. For example:
payload
-
Accept the default log level DEBUG or choose another setting to log less information. For example, choose INFO.
-
Click Run.
-
Execute the flow by sending a mock request.
-
Expand the Logs tab at the bottom of the screen.
The contents of the Mule message payload appear after Info along with .logs produced by the Logger components in your project and messages related to the running, executing, and deploying the app.