[ https://issues.apache.org/jira/browse/STORM-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kinon updated STORM-2617: -------------------------------- Description: 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. was: I noticed that the default log rotation configuration isn't working. A specific example is worker.log. Here is the default log4j2 configuration (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. > 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 (v6.4.14#64029)