Tuesday, October 20, 2009

Log4J : Path to properties file

For Glassfish, we normally put the log4j.properties in the "domain / config" directory.

To enable Glassfish to find it, add the following to the Glassfish JVM settings. Easiest way is to use the Admin console i.e. Application Server / JVM Settings / JVM Options.

Add this line:

-Dlog4j.configuration=file:///${com.sun.aas.instanceRoot}/config/log4j.properties

Enjoy!

1 comment:

Dhian Wicaksana said...
This comment has been removed by the author.