tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pedro Nevado" <>
Subject RE: Log4J in Tomcat 5.0...I don't believe the FAQ
Date Mon, 06 Sep 2004 10:33:14 GMT
I use commons-logging api for two reasons (I am affraid that one of them
better than the other):
- because I reuse classes that use it.
- because the people from whom I learned to program Java2EE use it.
Thanks for the reference; it is really interesting.

-----Mensaje original-----
De: Jacob Kjome []
Enviado el: domingo, 05 de septiembre de 2004 23:55
Para: Tomcat Users List
Asunto: RE: Log4J in Tomcat 5.0...I don't believe the FAQ

Why do you use commons-logging in your application classes?  I can see a
semi-legitimate argument for a framework doing this, so as to not force a
particular logging implementation on the user.   However, you are the
user.  You choose the logging implementation.  You have, obviously, chosen
Log4j as your implementation of choice.  Why not cut out the middle man
(commons-logging) and use Log4j?

You might be interested in this...

See links at the bottom of the page as well.


At 09:01 PM 9/5/2004 +0200, you wrote:
>In case it helps, this is what I do with Tomcat 5.0.28 (Win 2000 without
>installer, j2sdk1.4.2_04):
>- I do not put log4j.jar in commom/lib, but in the WEB-INF/lib of my web
>- I put log4j.xml (equivalent to and
> in WEB-INF/classes of my app.
>The archive contains:
>I use the commons-logging api in my application classes.
>Pedro Nevado
>-----Mensaje original-----
>De: Patrick Burleson []
>Enviado el: domingo, 05 de septiembre de 2004 17:05
>Asunto: Log4J in Tomcat 5.0...I don't believe the FAQ
>So I'm trying to get Tomcat 5.0 to use Log4J for its log output
>formatted to my liking. Started searching and found a link to this
>message in the Tomcat FAQ that says it has the solution.
>Well, after performing what seem like simple steps (probably the steps
>I would have done anyway), still no logging through Log4J.
>Did I miss some magically step number 4 or even step 0? I copied
>log4j-1.2.8.jar to <CATALINA>/commons/lib and put the example
> in <CATALINA>/commons/classes at DEBUG level and
>still only got the original format with only INFO level stuff printing
>I tried with the following versions of Tomcat on Windows XP with JDK
>1.4.2_05 and JDK 5.0-RC:
>5.0.27 Windows Installer
>5.0.27 Zip file
>5.0.19 Windows Installer
>5.0.19 Zip File
>I tried the last two since they were the version mention in the mail
>message. I tried the zips thinking maybe there was something
>"different" about the windows installers.
>Later in that thread it is mentioned by Jacob Kjome in message
> :
>" I've pointed out almost these exact instructions many times before
>and people keep asking or say it doesn't work (it does)."
>I just don't believe it. There has to be something I missed...but
>that's hard to do when there's only 3 steps, one of them being
>"Download Log4J".
>Any ideas?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message