logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nate Drake <ndr...@gmail.com>
Subject [PATCH] Allow RollingFileAppender to roll logs to other directories
Date Tue, 29 Apr 2008 01:46:20 GMT

We wanted to have our log files roll over into an different directory
organized by YYYY/MM.  The RollingFileAppender in log4j-extras almost
supports this, but when it attempts to do the rollover it fails, because the
directory structure isn't in place.  Attached is a patch to
FileRenameAction.java to make sure that the directory structure is in place
before attempting to do the rename.

Not sure if this is the best way to achieve this functionality or not. 
Comments welcome.

To test this, create a TimeBasedRollingPolicy like so:




http://www.nabble.com/file/p16951803/create_dirs.txt create_dirs.txt 
View this message in context: http://www.nabble.com/-PATCH--Allow-RollingFileAppender-to-roll-logs-to-other-directories-tp16951803p16951803.html
Sent from the Log4j - Dev mailing list archive at Nabble.com.

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message