logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From YesKay <keerthip...@yahoo.com>
Subject Re: missing debug statements when i changed to RollingFileAppender
Date Thu, 21 Aug 2008 14:24:09 GMT

Never mind... found the problem.

--------


YesKay wrote:
> 
> here is my log4j.xml -
> 
> <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE log4j:configuration SYSTEM
> "log4j.dtd" >
> <log4j:configuration>
> 	
> 	<appender name="stdout123" class="org.apache.log4j.ConsoleAppender">
> 		<layout class="org.apache.log4j.PatternLayout">
> 			
> 		</layout>
> 	</appender>
> 	
> 	<appender name="file123"
> 		class="org.apache.log4j.RollingFileAppender">
> 		
> 		
> 		
> 		
> 		<layout class="org.apache.log4j.PatternLayout">
> 			
> 		</layout>
> 	</appender>
>  
> 	<category name="SalesReportsAppLog">
> 	  <priority value="debug" />
>   	  <appender-ref ref="file123" />
> 	</category>
> 
> </log4j:configuration>
> 
> ========
> code is -
> 
> System.out.println("sree1");
> org.apache.log4j.Logger log =
> org.apache.log4j.Logger.getLogger("SalesReportsAppLog");
> log.info("sree123--info");
> log.debug("sree123--debug1");
> log.info("isdebug--" + log.isDebugEnabled());
> log.debug("sree123--debug2");
> log.trace("sree123--trace");
> System.out.println("sree2");
> 
> =======
> 
> using ConsoleAppender
> 
> sree1
> 13:00:14,323  INFO SalesReportsAppLog:69 - sree123--info
> 13:00:14,323 DEBUG SalesReportsAppLog:70 - sree123--debug1
> 13:00:14,354  INFO SalesReportsAppLog:71 - isdebug--true
> 13:00:14,354 DEBUG SalesReportsAppLog:72 - sree123--debug2
> sree2
> 
> using RollingFileAppender
> 
> 13:01:18,892  INFO SalesReportsAppLog:69 - sree123--info
> 13:01:18,892  INFO SalesReportsAppLog:71 - isdebug--true
> 
> I'm expecting those missng log stmts in the file appender too. Does anyone
> know why it's not printing those 2 lines when I changed to
> RollingFileAppender?
> 
> These missing in RollingFileAppender -
> 
> 13:00:14,323 DEBUG SalesReportsAppLog:70 - sree123--debug1
> 13:00:14,354 DEBUG SalesReportsAppLog:72 - sree123--debug2
> 
> Thanks for your help.
> 

-- 
View this message in context: http://www.nabble.com/missing-debug-statements-when-i-changed-to-RollingFileAppender-tp19075059p19089766.html
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