Using the Log4J2 Logging Framework

Universal Messaging supports the Log4j2 logging framework in container images and provides a default Log4j2 configuration. To enable Log4j2 for a container, set the LOG_FRAMEWORK=log4j2 environment variable when running the docker run command.

The log4j2.xml default configuration file is located inside the Universal Messaging container under /opt/softwareag/UniversalMessaging/lib/classes. The default configuration does not store the nirvana.log log file on disk but displays the log output to STDOUT. The output of the UMRealmService.log file is displayed in the console.

If you use a custom log4j2.xml configuration, you must retain the packages configuration entry that lists the Universal Messaging extension package for Log4j2:

Configuration packages="com.softwareag.um.extensions.logger.log4j2"

To configure the server logging level, use the nAdminAPI or the fLoggerLevel logging configuration property in the Enterprise Manager. To configure that property, you must first set LogLevelOverride to true. A false value for LogLevelOverride restores the configuration from log4j2.xml and overrides fLoggerLevel.

The following functionalities are not supported on a Universal Messaging server using Log4j2:

  • DefaultLogSize logging configuration property

  • LogManager logging configuration property

  • RolledLogFileDepth logging configuration property

  • Dynamic reconfiguration using the monitorInterval Log4J configuration attribute

  • Rolling the log file

For more information about the logging properties, see Realm Configuration.