You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Achim (Jira)" <ji...@apache.org> on 2022/01/26 06:37:00 UTC
[jira] [Commented] (LOG4J2-3349) RollingFileAppenderBuilder in log4j1 bridge does not create the appender as in log4j1
[ https://issues.apache.org/jira/browse/LOG4J2-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17482283#comment-17482283 ]
Achim commented on LOG4J2-3349:
-------------------------------
This has apparently been already fixed with https://github.com/apache/logging-log4j2/pull/710 in the upcoming 2.x release.
> 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
> Priority: Major
>
> [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)