dcsimg
DailyRollingFileAppender in Log4j does not work as expected
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Helena_Zhang
Posted On:   Friday, May 30, 2003 11:51 AM

I use log4j DailyRollingFileAppender. The rolling schedule is specified by the DatePattern = '.'yyyy-ww . So I expect weekly rollover schedules. My applicaton server runs since May 14, 2003. I got two rollover files So far. One is at 05/18/2003 and another at 05/30/2003. The schedule does not work as we expected.

If you have similar problem or you know why it does not work please let me know. My email is:

hzhang@anexsys.com

Thank you!

-Helena Zhang

Re: DailyRollingFileAppender in Log4j does not work as expected

Posted By:   Padmanabh_Murthy  
Posted On:   Friday, June 6, 2003 05:42 AM

hi

try this property file it will work.



# Set root logger level to DEBUG and its only appender to A1.


log4j.rootLogger=DEBUG, A1



# A1 is set to be a ConsoleAppender.

log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender

log4j.appender.A1.DatePattern='.'yyyy-ww

log4j.appender.A1.File=c:\temp\logpm\abc.html




# A1 uses PatternLayout.

# i am using HTMLLayout you can use any one of them.


log4j.appender.A1.layout=org.apache.log4j.HTMLLayout



#log4j.appender.A1.layout.ConversionPattern=%C %-4r %d [%t] %-5p %c %x -

%m%n%n

About | Sitemap | Contact