Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-2617

log4j2 RollingFile rotation failing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.1.0
    • None
    • storm-server
    • None
    • NA

    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):

          <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>
      

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dankinon Daniel Kinon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: