thanks for the answers ..
if i decide to use only one log4j.properties with tomcat , where can i put
this log4j.properties file
and how can i use logging system in my beans ? in every bean's method i
have to set like that
PropertyConfigurator.configure("/usr/local/tomcat/conf/log4j.properties");
???
i have confused, because log4j documents aren't very clear especially the
tomcat part
so if anyone can send me simple and short example i will be glad ..
-----Original Message-----
From: William Jaynes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 10:08 PM
To: LOG4J Users Mailing List
Subject: Re: tomcat and log4j
If one wishes different web apps to pick up different log4j.properties files
then
1) Do not set anything log4j related in the TOMCAT_OPTS
2) Do not have the log4j.jar anywhere but as specified in step 3.
3) put log4j.jar into each web apps WEB-INF/lib directory
4) put log4j.properties in each web apps WEB-INF/classes directory
With the above configuration the log4j default initialization for each web
app
will find the appropriate log4j.properties.
Will
----- Original Message -----
From: "Ceki Gülcü" <[EMAIL PROTECTED]>
To: "LOG4J Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 2:43 PM
Subject: Re: tomcat and log4j
That should not be the case. Different webapps should be loaded by different
classloaders resulting in parallel configurations of log4j.
At 16:48 19.07.2001 +0300, you wrote:
>Hi all
>
>i have got tomcat and log4j entegration problem ..
>
>first of all i defined " TOMCAT_OPTS =
>-Dlog4j.configuration=log4j.properties "
>then i put two log4j.properties under two different contexts , test ,
>bireysel
>these log4j.property files are different from each other
>
>content of log4j.property file under
>TOMCAT_HOME/webapps/test/WEB-INF/classes
>**************************************************************
># Set root category priority to DEBUG and its only appender to A1.
>log4j.rootCategory=DEBUG,Rx
>
>
># Rx is set to be a ConsoleAppender.
>log4j.appender.Rx=org.apache.log4j.FileAppender
>log4j.appender.Rx.File=/tmp/bireysel_heboo.log
>
># Rx uses PatternLayout.
>log4j.appender.Rx.layout=org.apache.log4j.PatternLayout
>log4j.appender.Rx.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
>****************************************************************
>
>content of log4j.property file under
>TOMCAT_HOME/webapps/bireysel/WEB-INF/classes
>**************************************************************
># Set root category priority to DEBUG and its only appender to A1.
>log4j.rootCategory=DEBUG,R
>
>
># R is set to be a ConsoleAppender.
>log4j.appender.R=org.apache.log4j.FileAppender
>log4j.appender.R.File=/tmp/heboo.log
>
># R uses PatternLayout.
>log4j.appender.R.layout=org.apache.log4j.PatternLayout
>log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
>****************************************************************
>
>
>
>but i encounter that that these two context's log data are written to the
>same log file "/tmp/bireysel_heboo.log"
>any idea ?
>
>thanks ..
>
>
>
>
>
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
--
Ceki Gülcü - http://qos.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]