MaxBackupIndex is only available in RollingFileAppender not in DailyRollingFileAppender. if you are interessted i can send you a modified DailyRollingFileappender that keeps only a limited amount of files (and zips old logs)
cheers patrick > -----Ursprüngliche Nachricht----- > Von: nithya rajeev [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 5. September 2006 21:17 > An: log4j-user@logging.apache.org > Betreff: Spam: MaxBackupIndex > > > Hello- > I am new to log4j. This is teh first time I am setting it up for my > application. I want to keep the log files which are ONLY 3 > days old and > newer. Any log file older than 3 days should get deleted. And I have > specified using the MaxBackupIndex property. But still the > files never get > deleted. I have to manually delete them. Can some give some > pointers/tips as > to why this is not happening as expected. Here is my log4j.properties. > Thanks. > > > # initialise root logger with level INFO > log4j.rootLogger=INFO,LOGMAIN > > # LOGMAIN APPENDER > log4j.appender.LOGMAIN=org.apache.log4j.DailyRollingFileAppender > log4j.appender.LOGMAIN.layout=org.apache.log4j.PatternLayout > log4j.appender.LOGMAIN.layout.ConversionPattern=%d{yyyy-MM-dd > HH:mm:ss.SSS} > %-5p %m%n > log4j.appender.LOGMAIN.DatePattern='.'yyyy-MM-dd-a > log4j.appender.LOGMAIN.File=/log4j.txt > log4j.appender.LOGMAIN.MaxBackupIndex=3 > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]