logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Scopa <paolosc...@yahoo.com>
Subject Re: Log problem with Tomcat 5 (lots of logs)
Date Mon, 17 Sep 2007 14:48:24 GMT

My mistake, it wasnt clear.
The log4j.xml is actually in the WEB-INF/classes directory and the
log4j-1.2.14.jar in the WEB-INF/lib.
There are no other cfg files around that i can see.
Tomcat runs in standalone mode. I remember i tried to set the debug option
in the log4j.xml but i didnt see anything wrong with the initialization.





Jacob Kjome wrote:
> 
> 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 <paoloscopa@yahoo.com> 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: 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Log-problem-with-Tomcat-5-%28lots-of-logs%29-tf4465225.html#a12737517
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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