You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Albretch Mueller <lb...@gmail.com> on 2008/01/24 19:23:04 UTC
using log4j to try to log from tomcat webapps
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
Re: using log4j to try to log from tomcat webapps
Posted by Jacob Kjome <ho...@visi.com>.
I answered this question in the other thread you posted. Please read it.
Jake
On Thu, 24 Jan 2008 14:12:23 -0500
"Albretch Mueller" <lb...@gmail.com> wrote:
>> ... Webapps to log using Log4j
> ~
> I was able to make tomcat itself log using the doc at:
> ~
> http://tomcat.apache.org/tomcat-6.0-doc/index.html
> ~
> but I haven't been able to use that doc to make webapps log
> ~
> I will try to use log4j programmatically from a webapps context
> listener and get more detail logs of the exceptions so I could take a
> better peek at may be going on
> ~
> Do you know of any good docs on using log4j with tomcat webapps?
> ~
> Thanks
> 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
Re: using log4j to try to log from tomcat webapps
Posted by Albretch Mueller <lb...@gmail.com>.
> ... Webapps to log using Log4j
~
I was able to make tomcat itself log using the doc at:
~
http://tomcat.apache.org/tomcat-6.0-doc/index.html
~
but I haven't been able to use that doc to make webapps log
~
I will try to use log4j programmatically from a webapps context
listener and get more detail logs of the exceptions so I could take a
better peek at may be going on
~
Do you know of any good docs on using log4j with tomcat webapps?
~
Thanks
lbrtchx
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: using log4j to try to log from tomcat webapps
Posted by Jacob Kjome <ho...@visi.com>.
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" <lb...@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