Configuring Node Logging

xMatters can create separate log files with details of all the transactions and communications for each Node. This section explains the levels of logging available, and how to configure the Node log settings to adjust the logging output.

Configuration levels

There are three configuration levels within xMatters: Global, Node, and Device Engine. Most configuration settings apply to only one level, but logging settings are an exception. Logging settings affect multiple levels, and changes on one level may interact with or affect settings on another level.

Interactions between log settings take one of two forms: inherit or override. Lower-level components inherit the log settings of higher-level components; that is, Device Engines inherit log settings from the Node to which they belong, and Nodes inherit log settings from the global configuration. If you change the log level settings for a lower-level component, you override the settings inherited from the higher-level component. If you then change a log setting at a higher level, the change affects only the higher-level component.

For example, if you set a Node’s log level to Normal, all Device Engines for the Node inherit the Normal log level. If you change the log level for a specific Device Engine to Detailed, then the log setting for the Device Engine overrides the setting inherited from the Node. If you then turn off the global logging, the log settings for the Node and Device Engine remain unchanged.

You can specify the logging settings for each Node independently when you add a Node or modify the details for an existing Node. The settings described in the following table are available on the Details page for each Node:

Node Logging Settings

Detail

Description

Log Directory

Location to store the log files.

Script Log Directory

Default location to store log files created by logging within scripts. Some scripts may override this location.

Log Level

Level of detail required for the log files.

xMatters uses the logging utility log4j, in which log levels are assigned to messages based on their severity. Select from the following options to specify the minimum severity level of messages to record in the logs:

  • Off: no logs are generated.
  • Fatal
  • Error
  • Normal (Warn) : logs include standard runtime output. (This option is equal to the “Normal” setting available in previous versions of xMatters.)
  • Info
  • Debug
  • Trace
  • Detailed (All) : logs include all debugging information, and line-by-line script interpretation. (This option outputs a high volume of data; use with discretion.)

The logs record any messages flagged with the specified severity level or higher. For example, if you select Info, the logs will include all messages flagged with Info, Warn, Error, and Fatal.

Note that more detailed log levels produce log files that cover a shorter time period.

Detailed Statistics Logging

Includes detailed component statistics, such as queue size and average execution times, in the log files. Note that enabling this feature can negatively impact performance.

Stopping Inter-Node Communication Error Logging

By default, inter-node communication errors generated by Mule are logged as single-line messages for each stack trace. You can eliminate even these single-line log entries by opening the hmApplicationContext.xml file (located at node/assets/resources/spring/ integration) in a text editor and setting logNodeCommunicationExceptions to "false". After making the change, restart the node.

Enabling XML Logging

In some versions of xMatters, XML logging on nodes is disabled by default (this can increase performance in high-thoughput scenarios). However, you can enable XML logging after installing xMatters and parse the resulting log files with tools such as Chainsaw (the files are in standard log4j XML format).

To enable XML logging on a node:
  1. Open the node's applicationContext.xml file in a text editor and change the logManager bean property usesXml setting to true.
  2. Open the node manager's nmApplicationContext.xml file in a text editor and change the nodeLogManager bean property usesXml to true.