Corey, I couldn't find a way to do that either. I made some changes to the DailyRollingFileAppender class to meet my needs. See the attachment.
This class creates a new log file each day. The log file is in the user directory. Yesterday's log file is renamed, and then 6 total log files are retained. The maxBackupIndex field controls how many log files are retained. Hope this is useful, John ________________________________ From: Corey Scott <[email protected]> Reply-To: Log4J Users List <[email protected]> Date: Thu, 14 Oct 2010 04:50:55 -0600 To: <[email protected]> Subject: RollingFileAppender + TimeBasedRollingPolicy Hi there, Is there some param i can set in the log4j.xml to have the TimeBasedRollingPolicy delete old files after x days? Im sorry if this is handled in the doco and Im too stupid to find it :) Cheers, Corey --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
