[logback-dev] [JIRA] Created: (LBCORE-138) Enable using a subclass of RollingCalendar
Andreas Dejung (JIRA)
noreply-jira at qos.ch
Thu Mar 4 00:06:16 CET 2010
Enable using a subclass of RollingCalendar
------------------------------------------
Key: LBCORE-138
URL: http://jira.qos.ch/browse/LBCORE-138
Project: logback-core
Issue Type: Improvement
Components: Appender
Affects Versions: 0.9.18
Environment: N/A
Reporter: Andreas Dejung
Assignee: Logback dev list
Priority: Minor
Hi all
What I can see there is no way to roll the file on a specific time. E.g. every day at 17:00
As we require this I had a closer look on how logback decides to roll. I found the ch.qos.logback.core.rolling.helper.RollingCalendar is responsible to define when the next roll should happen. I extended it so that one can define the time rather then 0:00 if you roll daily.
Now my problem is that there is no way to set my extended RollingCalander on the TimeBasedFileNameAndTriggeringPolicyBase as it is created inside the start method. Overriding the start of TimeBasedFileNameAndTriggeringPolicyBase and do the same without calling the super method works only if me override is in the same package which is not a nice thing. The problem would be easy solved if you would add a setter for the RollingCalander to the TimeBasedFileNameAndTriggeringPolicyBase and then change the line
rc = new RollingCalendar();
to
if(rc==null){
rc = new RollingCalendar();
}
Clearly I could just go ahead and change that by myself but I thought maybe someone else want's this as well and it would be nice not to keep a separate code base.
Cheers Andy
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the logback-dev
mailing list