Issue
- The log folder may become oversized, causing server hang-ups, so how do I configure the logging directory for Liferay?
Environment
- Liferay DXP 7.3
- Liferay DXP 7.4
Resolution
- The following are the steps that can be carried out to achieve this:
NOTE: The following resolution requires customization and should only be implemented at the discretion of your team. Liferay Support will not be able to assist with designing or implementing customizations.
1. Create a new login directory
2. Copy the portal-impl.jar file into the jar file location and extract it.
3. Go to the META-INF folder and look for the portal-log4j.xml file and edit it. This is the default value and change it according to your requirements
For reference:
4. Then, copy the portal-log4j.xml property to the Liferay meta-inf folder and change its name from portal-log4j.xml to portal-log4j-ext.xml
(/home/me/support_liferay_poc/dxp_2.0_quarteley_release/liferay-dxp/tomcat/webapps/ROOT/WEB-INF/classes/META-INF)
5. Similarly, you can also change the location of Catalina logs by configuring this file
(/home/me/support_liferay_poc/dxp_2.0_quarteley_release/liferay-dxp/tomcat/conf/logging.properties)
6. After making the changes, logs are stored in the new location.
Additional Information
- Please reach out to the Global Services Team if more assistance is required from the Liferay side, as customization comes under their scope of work.