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

Ivan Omar Olguin Torres commented on STORM-2617:
------------------------------------------------

This is a bug in log4j2:

https://issues.apache.org/jira/browse/LOG4J2-1804

The workaround works for me.

> log4j2 RollingFile rotation failing
> -----------------------------------
>
>                 Key: STORM-2617
>                 URL: https://issues.apache.org/jira/browse/STORM-2617
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-server
>    Affects Versions: 1.1.0
>         Environment: NA
>            Reporter: Daniel Kinon
>            Priority: Minor
>
> I noticed that the default log rotation configuration isn't working as 
> expected.  A specific example is worker.log.  Here is the default log4j2 
> configuration for worker.log (log4j2/worker.xml):
> {code:xml}
>     <RollingFile name="A1"
>                 
> fileName="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}"
>                 
> filePattern="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}.%i.gz">
>         <PatternLayout>
>             <pattern>${pattern}</pattern>
>         </PatternLayout>
>         <Policies>
>             <SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB 
> -->
>         </Policies>
>         <DefaultRolloverStrategy max="9"/>
>     </RollingFile>
> {code}
> Even thought the DefaultRolloverStrategy is set to 9, I only ever see 
> worker.log and worker.log.1.gz.  It seems like rotation is continually 
> overwriting worker.log.1.gz .  I expect this is either an issue with log4j2 
> or an issue related to the RollingFileAppender and the associated filePattern.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to