logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Kjome" <h...@visi.com>
Subject Re: using log4j to try to log from tomcat webapps
Date Thu, 24 Jan 2008 18:38:20 GMT
You are trying to get Tomcat to log using Log4j or Webapps to log using Log4j. 
 The former is somewhat involved and is documented in Tomcat's docs.  The 
latter (assuming you are using Tomcat standalone), is pretty simple.  Place 
log4j.jar in each webapp's WEB-INF/lib directory and log4j.xml or 
log4j.properties in each webapp's WEB-INF/classes directory.

Keep in mind that log4j's autoconfiguration prefers log4j.xml over 
log4j.properties.  If you have a stray log4j.xml in some parent classloader, 
it will use that in preference to your log4j.properties in WEB-INF/classes. 
 For this reason, use log4j.xml in your WEB-INF/classes to guarantee that this 
is the config file log4j will use for autoconfiguration.


Jake


On Thu, 24 Jan 2008 13:23:04 -0500
  "Albretch Mueller" <lbrtchx@gmail.com> wrote:
> Hi,
> ~
> I am trying to enable log4j logging in tomcat version 6.0.14
> ~
> I am using java version "1.6.0_02" on windows:
> ~
> C:\cmllpz\prjx\java\GWB\tc\tc-6.0.14\00_Virgin\bin>java -version
> java version "1.6.0_02"
> Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
> Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode)
> 
> C:\cmllpz\prjx\java\GWB\tc\tc-6.0.14\00_Virgin\bin>javac -version
> javac 1.6.0_02
> ~
> but I can not make webapps log to their separate files
> ~
> I have tried the tomcat users list, but they apparently gave up on me:
> ~
> * http://www.nabble.com/
> * users@tomcat.apache.org
> * Still trying to log using org.apache.juli.FileHandler
> ~
> Can you point me to a clear tutorial or step-by-step guide on how to
> enable webapps to log?
> ~
> Thank yu very much
> lbrtchx
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 


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


Mime
View raw message