You say that "he log4j-1.2.14.jar and the configuration file are in my project
lib directory". Do you mean that both the jar and the XML config file are in
WEB-INF/lib? That's not where the config file should should go. It should be
in WEB-INF/classes.
How are you running Tomcat? Is it in standalone mode or run through Eclipse
(or some other way)? Do you have Log4j config files elsewhere, such as
packaged with jars, in the classpath? You might want to start with
-Dlog4j.debug=true to determine which file it is using to perform
configuration.
Jake
On Mon, 17 Sep 2007 01:37:02 -0700 (PDT)
Paolo Scopa <[EMAIL PROTECTED]> wrote:
Hi,
i have a problem configuring log4j with tomcat 5.5.23 and tapestry 4.1.
I tried to configure log4j to give me debug messagess of my application only
The configuration works fine outside of tomcat/tapestry: however in
tomcat/tapestry i receive all the debug messages from hibernate, tapestry
etc, even if the level for them is set to error.
If i set the priority to error for the root, i don't see any message (except
errors) even for my application.
When i set it to debug, all the hibernate etc message come up.
Any idea what am i doing wrong?
The log4j-1.2.14.jar and the configuration file are in my project lib
directory, so that it should be separated from tomcat logs.
Attached the log4j.xml i use:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
</layout>
</appender>
<appender name="rolling"
class="org.apache.log4j.RollingFileAppender">
<layout class="org.apache.log4j.PatternLayout">
</layout>
</appender>
<logger name="org.appl">
<level value="debug"/>
</logger>
<logger name="org.apache.hivemind">
<level value="error"/>
</logger>
<logger name="org.hibernate">
<level value="error"/>
</logger>
<logger name="org.apache.tapestry">
<level value="error"/>
</logger>
<root>
<priority value="debug"/>
<appender-ref ref="console"/>
<appender-ref ref="rolling"/>
</root>
</log4j:configuration>
--
View this message in context:
http://www.nabble.com/Log-problem-with-Tomcat-5-%28lots-of-logs%29-tf4465225.html#a12731649
Sent from the Log4j - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
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]