You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Niclas Hedhman <ni...@ewarna.com> on 2002/09/30 09:40:00 UTC

Tomcat and Log4J

I am sure this has been up before, but I can't find it in my archive.

What do I need to do to get Log4J to read my log4j.properties file???

Basic example, straight from docs;

# Set root logger level to DEBUG and its only appender to A2.
log4j.rootLogger=DEBUG, A2

log4j.appender.A2=org.apache.log4j.FileAppender
log4j.appender.A2.File=file:///tomcat/webapps/soap-service/logs/xzone.log
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=%-5p [%t] %C{2} (%F:%L) - %m%n

(I have tried xzone.log as well as full paths.)

I have tried having log4j.jar in the WEB-INF/lib/, as well as in /tomcat/lib, 
but to no avail.

I keep getting the logger output to localhost.log, with the default 
formatting.


Close to nervous breakdown....
Niclas

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat and Log4J

Posted by Niclas Hedhman <ni...@ewarna.com>.
On Monday 30 September 2002 15:56, Ceki Gülcü wrote:
> Try log4j.jar in WEB-INF/lib/ and log4j.properties in WEB-INF/classes

Well, I did that... but, the good news is  - I found the problem.

There was an "ancient" CATALINA_OPTS setting in the start script, that pointed 
to a different log4j.properties name (which did not exist).

Niclas

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat and Log4J

Posted by Ceki Gülcü <ce...@qos.ch>.
Try log4j.jar in WEB-INF/lib/ and log4j.properties in WEB-INF/classes

At 15:40 30.09.2002 +0800, you wrote:

>I am sure this has been up before, but I can't find it in my archive.
>
>What do I need to do to get Log4J to read my log4j.properties file???
>
>Basic example, straight from docs;
>
># Set root logger level to DEBUG and its only appender to A2.
>log4j.rootLogger=DEBUG, A2
>
>log4j.appender.A2=org.apache.log4j.FileAppender
>log4j.appender.A2.File=file:///tomcat/webapps/soap-service/logs/xzone.log
>log4j.appender.A2.layout=org.apache.log4j.PatternLayout
>log4j.appender.A2.layout.ConversionPattern=%-5p [%t] %C{2} (%F:%L) - %m%n
>
>(I have tried xzone.log as well as full paths.)
>
>I have tried having log4j.jar in the WEB-INF/lib/, as well as in /tomcat/lib,
>but to no avail.
>
>I keep getting the logger output to localhost.log, with the default
>formatting.
>
>
>Close to nervous breakdown....
>Niclas

--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>