Contact Free trial Login

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

payload

The full contents of the payload.

payload.user.id

The value of "id", a child element of "user" in the payload

attributes.myAttribute

The value of an attribute named "myAttribute"

myVariable

The value of a variable named myVariable

"ID of user sending request " ++ payload.user.id

Some static text concatenated with the value of "id".

upper(payload.user.name)

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:

log view
  1. Add a Logger core component to your flow.

  2. In Message, click Function logger task design center 0a147 to use an expression.

    If you just want to log static text, do not click Function. Just type the text.

  3. Type an expression. For example:

    payload

  4. Accept the default log level DEBUG or choose another setting to log less information. For example, choose INFO.

  5. Click Run.

  6. Execute the flow by sending a mock request.

  7. Expand the Logs tab at the bottom of the screen.

    to debug a flow designer project 30b5a

    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.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub