Log4j 2 configuration files

Log4J 2 can handle multiple configuration files in a so-called composite configuration. Logging settings are assembled from multiple configuration files, including module-specific files and the central all-modules.xml file.

By default, a logging configuration file template is placed in instances/${instance.name}/log4j/ for each module. Maintaining logging settings separately for each module can be error-prone and time-consuming. Therefore, IAM provides the central all-modules.xml file for shared logging configuration.

As a consequence:

  • Changes in /log4j/all-modules.xml are merged into the logging configuration of all IAM modules.
  • Module-specific logging settings can be configured directly in the corresponding XML files (e.g., /log4j/loginapp.xml, log4j/adminapp.xml); profiles are not required.

Possible use cases for changing all-modules.xml:

  • Adding additional custom log appenders (e.g., syslog)
  • Enabling/disabling built-in appenders (e.g., PARSABLE appender)
 
Notice

Airlock IAM uses the standard Apache Log4j 2 library. All standard Log4j 2 functionality, such as appenders, filtering, layouts, and composite configuration, can be used.

For more information and configuration details, see  Apache Log4j 2 Website.

 
Functional limitation

Log4j does not support log rotation for symlink paths (log files cannot be deleted in this case). Instead of using symlinks, set the direct storage path, e.g.: iam.log.structured-file.dir = /var/log/iam.