Viewing log messages in the log viewer

You can view log messages for your integrations in the built-in log viewer in App Connect.

About this task

The App Connect log viewer shows information, error, and audit messages for your flows, integration runtimes, and App Connect instance. The log viewer shows a maximum of 500 messages and you can view logged messages for events that occurred in the last 30 days.
Tip: If you filter messages (for example, to show messages for a particular runtime), you can see 500 messages for that runtime.
The following data is available by default for your App Connect Enterprise as a Service instance and the event-driven and API flows that you create in App Connect Designer.
  • An error message is emitted when an event, action, or some flow logic failed.
  • An information message is emitted at key points, such as when a flow is triggered, or when it completes successfully.
  • An audit message is emitted when a user completes an operation in App Connect and when changes are made to your service instance. (For more information, see Viewing audit information.)
Default logging versus user and service trace
The default log messages are the least verbose form of logging. If you want more verbose information, you can enable user trace for your flows. If you're working with the Support team to debug an issue, they might ask you to enable service trace, which is the most verbose form of logging. User and service trace are disabled by default because they can affect performance. For more information, see Collecting trace for deployed flows.
The App Connect Designer Log node
You can enhance logging by adding a Log node to your event-driven and API flows from the Toolbox in App Connect Designer. Use the Log node to define your own custom messages and custom fields for specific content that you want to log. You can then view this customized information in the log viewer. For more information, see Enhancing logging with customized log messages.
The IBM App Connect Enterprise Toolkit Log node
You can also add a Log node to a flow that you create in the IBM App Connect Enterprise Toolkit. When you deploy a Toolkit flow to App Connect Enterprise as a Service, you can view the output from the Log node by adding a server.conf.yaml configuration during deployment. For more information, see Viewing output from the App Connect Enterprise Toolkit Log node.

Viewing log messages in App Connect Enterprise as a Service

Procedure

  1. To view log messages, open the Logs tab Icon that represents the Logs tab.
  2. To show the most recent messages, select an appropriate time period from the list.
    Event messages are available for events that occurred in the previous 30 days.
    Screenshot shows that Last 24 hours is selected from the drop-down menu

    To show events for a specific period within the last 30 days, click Custom and specify a start date and time and an end date and time. In the following example, the query shows all events between 1 PM and 5 PM on a particular day.

    A custom time range from 13:00 on 31 October until 17:00 on the same day. The local time zone is selected.

    After you click Apply, you can change the custom range by clicking Edit The Edit icon next to the date range.

  3. To filter messages for a particular type of message, click Open filters Filter icon on the log viewer toolbar on the log viewer toolbar, then select the runtime, integration, event type, or transaction ID that you're interested in.
  4. To search the logs that are visible on the page, enter the value that you want to search for in Search logs Search icon.
    The events are filtered as you type in the search field.
  5. To download the filtered logs as a JSON file, click Download Download logs icon on the log viewer toolbar.
  6. To show, hide, or reorder columns in the table, click Customize columns The Customize columns icon.

What to do next

If you can't get enough information from the logs about an issue in a deployed flow, trace can provide more detail about what is happening when code runs. For more information, see Collecting trace for deployed flows.

Viewing output from the App Connect Enterprise Toolkit Log node

About this task

When you create an integration in the App Connect Enterprise Toolkit, you can add a Log node, which writes error, information, and debug messages to the Activity Log. When you deploy that integration to App Connect Enterprise as a Service, you must add a configuration so that you can see the output from the Log node in the Logs view.

The following steps describe how to configure logging when you deploy a Toolkit flow that contains a Log node to App Connect Enterprise as a Service. The instructions assume that you already packaged your message flow as a BAR file and imported it to App Connect Enterprise as a Service.

Procedure

  1. Create or copy a server.conf.yaml file.

    You can find a copy of the file in the local directory installDir/server/sample/configuration where the App Connect Enterprise Toolkit is installed. (On Windows, the path is C:\Program Files\IBM\ACE\13.#.#.#\server\sample\configuration.) Alternatively, you can download this sample file: server.conf.zip.

  2. In the ActivityLog section of the server.conf.yaml file, customize the ActivityLogTemplate properties with the following values and save it.
    • Change ActivityLogTemplate to a name that describes the configuration.
    • Set filter to TYPE=LOG.
    • Set consoleLog to true.
    • Set consoleLogFormat to 'ibmjson'.
    ActivityLog:
      MyLoggingConfiguration:
        filter: TYPE=LOG
        consoleLog: true
        consoleLogFormat: 'ibmjson'
    
    Note: You can create a separate ActivityLog configuration with a filter for each type of logging information that you want to show. If you remove the filter property, all logging messages are written to the Logs view. For more information, see Configuring activity log output in the App Connect Enterprise documentation.
  3. Optional: By default, debug messages aren't shown in the log viewer because their verbose nature can affect performance. To enable debug logging, add minSeverityLevel: 'DEBUG' to the ActivityLog configuration.
    ActivityLog:
      MyLoggingConfiguration:
        filter: TYPE=LOG
        consoleLog: true
        consoleLogFormat: 'ibmjson'
        minSeverityLevel: 'DEBUG'
    
  4. Go to the Configurations page The icon that represents the Configurations page and click Create configuration.
  5. Set the configuration type to server.conf.yaml and enter a name so that you can identify it in the list of configurations.
  6. In the server.conf.yaml field, paste or import the contents of the server.conf.yaml file that contains the customized ActivityLog section, then click Create.
  7. When you deploy the BAR file that contains your App Connect Enterprise Toolkit flow, select the configuration server.conf.yaml configuration that you created in the previous step.
    For more information, see Deploying integrations.

Results

When your flow is deployed and running, you can view the log messages in the Logs view in App Connect Enterprise as a Service.