Use log4j v1.x at Runtime with Bloomreach Experience Manager 12

Bloomreach Experience Manager 12 requires log4j2 for development and uses it by default at runtime. However, you can configure the system to use log4j v1.x at runtime if necessary.

To build a CMS 12 distribution that uses log4j v1.x at runtime, complete the following steps:

Prerequisites

  • A Bloomreach Experience Manager 12 distribution archive.
  • Access to modify files within the distribution.

Steps

  1. Open the distribution archive.

  2. In the conf directory, replace the existing log4j2.xml file with a valid log4j.xml configuration file.

  3. In the shared/lib directory, replace the following JAR files (versions may vary):

jcl-over-slf4j-1.7.25.jar log4j-api-2.8.2.jar log4j-core-2.8.2.jar log4j-slf4j-impl-2.8.2.jar slf4j-api-1.7.25.jar

with these files:

jcl-over-slf4j-1.7.6.jar log4j-1.2.17.jar slf4j-api-1.7.6.jar slf4j-log4j12-1.7.6.jar

Verification

After making these changes, start the application and verify that logging is handled by log4j v1.x. Check the logs to confirm that log4j v1.x is active and no log4j2 classes are loaded at runtime.

Notes

  • Only use log4j v1.x at runtime if you have a specific requirement that prevents you from using log4j2.
  • Ensure that your log4j.xml configuration matches your application's logging requirements.
  • The exact JAR versions may differ depending on your environment. Adjust as needed to match your setup.
Share Feedback
Page: /deploy/on-premise-deployment/deployment-overview/use-log4j1-at-runtime-with-v12
Section: Deploy
Category *