Achim created LOG4J2-3349:
-----------------------------

             Summary: RollingFileAppenderBuilder in log4j1 bridge does not 
create the appender as in log4j1
                 Key: LOG4J2-3349
                 URL: https://issues.apache.org/jira/browse/LOG4J2-3349
             Project: Log4j 2
          Issue Type: Bug
          Components: Configuration
    Affects Versions: 2.17.1
            Reporter: Achim


[https://github.com/apache/logging-log4j2/blob/release-2.x/log4j-1.2-api/src/main/java/org/apache/log4j/builders/appender/RollingFileAppenderBuilder.java]

creates the appender with a date filePattern.

We are using a configuration like this
{noformat}
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{DEFAULT} [%t] %-5p %-33c{1} %x 
%m%n
log4j.appender.file.File=foobar.log
log4j.appender.file.MaxFileSize=200000KB
log4j.appender.file.MaxBackupIndex=100
{noformat}
With log4j 1.2.17 this created rolled files
foobar.log.1
foobar.log.2
etc

With log4j2 and the bridge we get
foobar.log2021-12-19

We could live with the date pattern but it should produce 
foobar.log.2021-12-19

But since the rollover policy is still size-based what happens if the file is 
rolled twice a day?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to