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.
- Open a PC Command Line on the m-Power Server
- Navigate to the Tomcat Bin Directory
- 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.
- 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.
- 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
- Add the following line to the bottom of the Java Options window:
- Click OK.
- 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.