Upgrading to Log4j 2

SAP Commerce allows you to check whether your system still uses any Log4j 1.x configuration properties.

Use the following properties to check whether your system still uses any Log4j 1.x configuration properties:

  • log4j.deprecated.properties.warn=true - allows you to check whether your instance of SAP Commerce still uses any Log4j 1.x properties by printing a warning in your logs. The property is set to true by default.

  • log4j.deprecated.properties.print=false - allows you to print a list of Log4j 1.x properties in your logs that are still being used by the system. The property is set to false by default.

Restart your system to apply these properties. Replace any old Log4j 1.x properties with their Log4j 2.x equivalents to ensure that SAP Commerce logs all information correctly.

See an example of a Log4j 1 configuration property:

log4j.logger.hsqldb.db=warn, CONSOLE

This setting can be represented by the following Log4j 2 properties:

log4j2.logger.hsqldb.name = hsqldb.db
log4j2.logger.hsqldb.level = warn
log4j2.logger.hsqldb.appenderRef.stdout.ref = STDOUT

For more information on migrating to Log4j 2 configuration, see Log4j 2 Configuration FormatInformation published on non-SAP site.