Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1725

RollingFileAppender's filePattern not reloaded when using monitorInterval

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.9.0
    • Component/s: None
    • Labels:
      None

      Description

      Using the configuration below:

      <?xml version="1.0" encoding="UTF-8"?>
      <Configuration status="info" monitorInterval="2">
        <Appenders>
          <RollingFile name="MyRollingFile" fileName="/usr/local/apps/testlogging/logs/app.log" filePattern="/usr/local/apps/testlogging/logs/app.log.%i">
            <PatternLayout>
              <Pattern>%d %p %c{1.} [%t] %m%n</Pattern>
            </PatternLayout>
            <Policies>
              <SizeBasedTriggeringPolicy size="100MB"/>
            </Policies>
            <DefaultRolloverStrategy max="10"/>
          </RollingFile>
        </Appenders>
        <Loggers>
          <Root level="info" includeLocation="false">
            <AppenderRef ref="MyRollingFile"/>
          </Root>
        </Loggers>
      </Configuration>

      Updating the filePattern to app.log.%i.zip won't be taken into account dynamically.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                benjamin.jaton Benjamin Jaton
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: