Logging improvements

Logging improvements

Starting with 10.0 HF1 logging in Product 360 has been updated to run with log4j2. This means that a number of configuration files have been changed to support the newer version of log4j. Besides changes made in log4j configuration files, the
wrapper.conf
file needs to be adjusted as well in order to configure the path to the new
log4j2.xml
configuration. The following code snippet is an example for the Control Center component:
wrapper.conf
# Old configuration to specify the path to log4j.xml wrapper.java.additional.11=-Dlog4j.configuration=file\:"%CLUSTERIX_CONFIGURATION_DIR%/log4j.xml" vs. # New configuration to specify the path to log4j2.xml wrapper.java.additional.11=-Dlog4j2.configurationFile=file:"%CLUSTERIX_CONFIGURATION_DIR%/log4j2.xml" wrapper.java.additional.12=-Dorg.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
Please note that the variable to the log4j path has also changed inside the
log4j2.xml
file. Instead of using
${pim.log4j.path}
, you now need to use
${sys:pim.log4j.path}
to access the log4j2 path.
If you use the SDK, a new version of Eclipse (2020.06 or higher) is recommended. If there are still dependencies to the old
org.apache.log4j
plugin, you should create a new Eclipse workspace.

Product 360 Server and Desktop Client

The Product 360 Server and Desktop Client now store the logging configuration inside their new
log4j2.xml
files, replacing their old
log4j.xml
files. The location of these files has not changed.

Control Center

The Control Center logging configuration is also stored inside the
log4j2.xml
file.

Custom appenders

The required implementation to configure custom appenders has changed. To see what has changed, please check the example implementation of a custom appender under
{server location}/sdk/examples/customizing

Media Manager

The logging configuration is now stored in the
newlog4j2.xml
file . This new configuration replaces the old
log4j.properties
file. The location of the configuration file within each module does not change. The same goes for the available loggers. This affects the following Product 360 Media Manager modules:
  • Product 360 Media Manager Web application
  • Product 360 Media Manager Process Engine
  • Product 360 Media Manager REST Service for Supplier Portal
  • Product 360 Media Manager Database Updater

0 COMMENTS

We’d like to hear from you!