Creating a custom configuration file: portal-log4j-ext.xml

The first step is to get a copy of the original configuration file. Depending on our environment the portal-log4j.xml can be found in:

  • Liferay's sources: portal-impl/classes/META-INF/
  • Tomcat bundle: inside $TOMCAT/WEB-INF/lib/portal-impl.jar in META-INF/

Make a copy of that file and rename it as portal-log4j-ext.xml. It is recommended that you only keep in that file those entries that have been modified, delete the other entries, since they'll be loaded from portal-log4j.xml.

The file has to be deployed inside a directory $TOMCAT_HOME/webapps/ROOT/WEB-INF/classes/META-INF

For more informations see here:

liferay.com