1. Home
  2. log4j1 Replaced in m-Power

log4j1 Replaced in m-Power

With the June 2024 update, m-Power has transitioned from log4j1 to log4j2. This change is aimed at enhancing security and performance. However, this update also brings some adjustments for applications previously compiled with log4j1, as they will now have limited logging capabilities. To fully restore logging functionality, please follow the steps outlined below.

  1. Open a PC Command Line on the m-Power Server
  2. Navigate to the Tomcat Bin Directory
  3. Type the following command and press Enter:
    cd C:\Program Files\mrc\development\m-power\tomcat\bin
    • Note: Ensure this path matches your specific m-Power installation directory.
  4. Next, type tomcat9w //ES//TC9DEV where TC9DEV is the service name of Tomcat.
    • Note: If using Tomcat 7, please change all references of 9 to 7.
  5. A window will pop up. Switch to the Java tab.
    • Add the following line to the bottom of the Java Options window:
      -Dlog4j1.compatibility=true
  6. Click OK.
  7. Restart Tomcat

Repeat these steps for all installed instances of Tomcat.

Additional Notes

For Linux Servers:

  • You will need to manually add the Java option from step 5 to the setenv.sh file located in the \m-power\tomcat\bin directory.
  • Open the setenv.sh file in a text editor and add the following line:
    • export JAVA_OPTS="$JAVA_OPTS -Dlog4j1.compatibility=true"
  • Save the changes and restart the Tomcat service using the appropriate command for your Linux distribution.

By following these steps, you can ensure that your applications continue to function correctly with the new log4j2 framework in m-Power. If you encounter any issues, please contact technical support for further assistance.

Updated on June 21, 2024

Was this article helpful?

Need Support?
Can't find the answer you're looking for? Don't worry we're here to help!
CONTACT SUPPORT