On Sun, 29 Aug 2010 02:40:43 -0700 (PDT)
 BenXS <bxsto...@yahoo.co.uk> wrote:


Jacob Kjome wrote:

1.  If you deploy your app as a WAR file, then you can utilize child-first classloading.  As long as you include log4j.jar in WEB-INF/lib and log4j.properties (or log4j.xml) in WEB-INF/classes, then you will end up using your own config rather than the server's.


Ok, thank you.

Can I omit the own, second log4j.jar and use only the own,second
log4j.properties file?

Or is my own, private log4j.properties file not recognized if I do not
attach my own log4j.jar ?


You need to follow the instructions completely....

1.  Set your webapp to child-first (otherwise known as parent-last) classloading.  This is the default classloading behavior in Tomcat 4/5/6/7 standalone, BTW.  You'll have to set it explicitly when using other containers.  Check the documentation of the container you are using for further info.

2.  Add log4j.jar to WEB-INF/lib

3.  Add log4j.properties to WEB-INF/classes


Jake

Ben
--
View this message in context: http://old.nabble.com/How-to-use-a-second-log4j.properties-file-for-a-special-java-program--tp29540603p29564582.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to