You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Divya Shetty <di...@pune.tcs.co.in> on 2003/11/29 06:30:07 UTC

DailyRollingFileAppender with filesize option

Hi,

I have the following log4j property file:

log4j.rootLogger=debug, A
log4j.logger.SickPay=debug, SP

log4j.appender.SP=org.apache.log4j.DailyRollingFileAppender
log4j.appender.SP.File=COMMON~1\\Trial\\SP.log
log4j.appender.SP.MaxFileSize=1KB
log4j.appender.SP.MaxBackupIndex=6
log4j.appender.SP.layout=org.apache.log4j.PatternLayout
log4j.appender.SP.layout.ConversionPattern=%d ::%m%n

I need to roll over the file on basis of both the date and Size of the file.
When i run the application it gives me the compilation error: 
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.

I checked the Mail list archive and there was a suggestion that one use CompositeRollingFileAppender.
Where can i find CompositeRollingFileAppender?

Could anyone suggest a way to implement this?

Regards,
Ms. Divya Shetty