You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Mike Percy (JIRA)" <ji...@apache.org> on 2013/01/25 01:43:13 UTC

[jira] [Commented] (FLUME-1874) Ship with log4j.properties file that has a reliable time based rolling policy

    [ https://issues.apache.org/jira/browse/FLUME-1874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13562218#comment-13562218 ] 

Mike Percy commented on FLUME-1874:
-----------------------------------

On 2nd thought, defaulting to something that can fill a disk is dangerous.

But we should support something like this as an example that is disabled by default:

{noformat}
# Warning! This will fill up your disk if you don't have a cleanup job!
log4j.appender.ROLL=org.apache.log4j.rolling.RollingFileAppender
log4j.appender.ROLL.rollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy
log4j.appender.ROLL.rollingPolicy.ActiveFileName=${flume.log.dir}/${flume.log.file}
log4j.appender.ROLL.rollingPolicy.FileNamePattern=${flume.log.dir}/archive/${flume.log.file}.%d{yyyy-MM-dd_HH-MM}
log4j.appender.ROLL.layout=org.apache.log4j.PatternLayout
log4j.appender.ROLL.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %-5p [%t] (%C.%M:%L) %x - %m%n
{noformat}

                
> Ship with log4j.properties file that has a reliable time based rolling policy
> -----------------------------------------------------------------------------
>
>                 Key: FLUME-1874
>                 URL: https://issues.apache.org/jira/browse/FLUME-1874
>             Project: Flume
>          Issue Type: Improvement
>            Reporter: Mike Percy
>             Fix For: v1.4.0
>
>
> i.e. http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/TimeBasedRollingPolicy.html
> DailyRollingFileAppender exhibits data loss so that is a no-go
> Need to investigate what a reliable solution is

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira