Nav

To Log Data (Design Center)

You add one or more Logger utilities to a flow to log information from the Mule event or static messages that you specify in the log. Logging information is helpful for troubleshooting and taking a quick look at the output at some point in the flow. You can use expresssions to create the log message. For example:

IS THE DEFAULT LOG LEVEL CHANGING TO DEBUG?

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.

  1. In Design Center add a Logger 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 the Deploy button to deploy your application to a Design environment.

  6. Trigger 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 deploying and running of the app.

In this topic: