Writing activity logs to files, to the integration server console, or to an ELK stack

You can write your activity logs to a file, to the integration server console (standard out), to an ELK stack, or to a combination of these output destinations.

About this task

By default, you can view recent activity log data for a message flow by using the Activity Log view in the web user interface, as described in Viewing activity logs for message flows in the web user interface. If you would like to view activities over a longer period, you can also write activity logs to the following output destinations:
File system
Activity logs can be written to a circular file system, which enables continuous logging of activities over a long period. You can use properties in an Activity Log policy or server.conf.yaml file to enable the writing of activity log entries to files, and configure the size and number of log files and the criteria by which the log rotates from one file to the next. You can also identify the location and file name of the log files.
Logstash in an ELK stack
You can use properties in an Activity Log policy or server.conf.yaml file to control the publication of activity log data to Logstash in an ELK stack. Publication of activity log data to ELK is turned off by default.
Integration server console (standard out)
You can write activity log entries to the integration server console (standard out) by setting the consoleLog property in the ActivityLog policy or server.conf.yaml file to true. Configure the format of these entries by setting the consoleLogFormat property to idText, text or ibmjson.

You can specify the output destination of activity log data (and configure the activity log data that you want to capture), either by using an Activity Log policy or by setting properties in the ActivityLog section of the integration server's server.conf.yaml file.

You can use an Activity Log policy or properties in the server.conf.yaml file to configure the following activity log characteristics:

  • Whether file logging is enabled
  • The maximum number of files used for each log
  • The maximum size of the log files (before the log rotates to the next file). If the maximum size is not reached, and the integration server is restarted, a new log file is created.
  • The maximum age of the log files (before the log rotates to the next file)
  • Filters that determine the content of the logs
  • The severity levels of messages logged
  • The log path and file name
  • Whether messages are formatted with inserts included in the message text
  • The scope of the policy (which integration server it applies to)
  • Whether publication to ELK is enabled
  • The ELK connection configuration to be used

The scope of the settings is the integration server. For example, if you set the Number of log files property to 5, each integration server has a maximum of five files for its activity log.

Procedure

Configure activity logging by using one of the following methods: