[ 
https://issues.apache.org/jira/browse/SLING-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734517#action_12734517
 ] 

Felix Meschberger commented on SLING-978:
-----------------------------------------

Added support for time/date scheduled log rotation analogous to Log4J's 
DailyRollingFileAppender in Rev. 796980.

The configuration itself is not modified but the interpretation of the 
configuration is changed:

If the log file threshold (previously called file size) is defined using a 
plain number or a number with a size specifier (case-insensitively any of k, 
kb, m, mb, g, or gb) the log file is rotated per its size. Otherwise the 
configuration value is assumed to be a SimpleDateFormat pattern to be used  as 
a pattern to generate the name of the rotated log file and indicating when to 
rotate the log file.

The defualt value is also changed (was 10MB until now) to "'.'yyyy-MM-dd" 
indicating daily log file rotation.

Finally the number of log file generations specified of course only applies to 
size-based log file rotation. Date/Time based log file rotation does not remove 
old log file generations.

> Allow Sling logs to be configured to rotate on time instead of file size
> ------------------------------------------------------------------------
>
>                 Key: SLING-978
>                 URL: https://issues.apache.org/jira/browse/SLING-978
>             Project: Sling
>          Issue Type: New Feature
>          Components: Commons Log
>    Affects Versions: Commons Log 2.0.4
>            Reporter: Hakim Sadikali
>            Assignee: Felix Meschberger
>             Fix For: Commons Log 2.0.6
>
>
> Log4j has the ability to rotate logs daily/based on a time parameter rather 
> than a file size.  This makes system administration easier since the "right" 
> log file can be easily identified based on when a problem occurred. 
> A similar feature inside Sling logging would be useful.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to