Bug 42598 - Allow rolling appenders to put rolled files in another directory
Summary: Allow rolling appenders to put rolled files in another directory
Status: RESOLVED LATER
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Appender (show other bugs)
Version: 1.2
Hardware: All other
: P2 normal
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2007-06-05 20:46 UTC by Chris Heisterkamp
Modified: 2007-08-22 20:13 UTC (History)
0 users



Attachments
Patch to allow rolling appenders to put rolled files in another directory (22.05 KB, patch)
2007-06-05 20:47 UTC, Chris Heisterkamp
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Heisterkamp 2007-06-05 20:46:09 UTC
This is a patch that allows DailyRollingFileAppender and RollingFileAppender to
specify a backup directory to roll log files into.

e.g. in log4j.properties for a RollingFileAppender you can specify

log4j.appender.testAppender.file=sample.log
log4j.appender.testAppender.BackupDirectory=archive

and backup files will be rolled into the archive directory

It will attempt to create the backup directory if it doesn't exist.  If it
cannot create the backup directory it will use the default directory the log
file is in.
Comment 1 Chris Heisterkamp 2007-06-05 20:47:36 UTC
Created attachment 20317 [details]
Patch to allow rolling appenders to put rolled files in another directory
Comment 2 Curt Arnold 2007-08-22 20:13:02 UTC
org.apache.log4j.RFA and DRFA are pretty untouchable.  They are known to have problems, but can't really 
touch them without the potential for breaking something.  org.apache.log4j.rolling.RollingFileAppender is 
somewhat better.  The multifile appender project was supposed to be the killer implementation, but has 
been dormant.  All that to say that this should be reviewed with multifile or log4j 2.0 design is kicked off.