Logging in Interact

Design time

Interact uses the framework and mechanism provided by Campaign. See the Campaign documentation for details.

Run time

Basic logging

Logging is performed using Apache Log4j2. The configuration is done through a standard Log4j2 configuration file, which is provided through the Platform configuration setting Affinium|Interact|general:log4jConfig. The value can either be an absolute or a relative path to that file. If it is a relative path, it is relative to the value of environment variable $INTERACT_HOME.

Some commonly used customization of the default logging behavior is included in the following configuration file $INTERACT_HOME/conf/interact_log4j2.xml.
  • Changing the logging level of a particular area in Interact.
  • Enabling asynchronous logging.
  • Applying their own logging levels at different outputs.

Centralized logging

Interact also provides a method for centralizing logs from all instances in a same server group, which is enabled through the Platform configuration Affinium|Interact|general|centralizedLogger:enabled. When enabled, all logs are persisted into table UACI_Log in the runtime database. This persistence is performed in batches and the threshold can be adjusted based on time and the pending logs using the configuration settings maxDelayInSec and maxBatchSize, respectively, in the same category.

Session specific logging

In addition, Interact can optionally print the logs associated to a specific session into a separate file. This is enabled per session on basis of an API parameter UACILogSeparationFileName, with its value being the full path of the output file. If this target file already exists, new logs will be appended.