[ https://issues.apache.org/jira/browse/LOG4J2-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Remko Popma resolved LOG4J2-315. -------------------------------- Resolution: Not A Problem I finally found the answer to why this is happening: it's the spec. By default the DefaultRolloverStrategy only keeps up to 7 files for the same date pattern... http://logging.apache.org/log4j/2.x/manual/appenders.html#DefaultRolloverStrategy (Perhaps this should be stated more prominently in the documentation.) If you add this line to your configuration you can increase the number of rolled-over files that can co-exist: {{<DefaultRolloverStrategy max="20"/>}} Example configuration snippet: {code} <RollingFile name="SUMMARY_ALL" fileName="./logs/summary.log" filePattern="logs/$${date:yyyy-MM}/summary-%d{yyyy-MM-dd-HH-mm}-%i.log"> <PatternLayout> <pattern>%d{ISO8601} [%t] %p %c - %m%n</pattern> </PatternLayout> <Policies> <TimeBasedTriggeringPolicy interval="6" modulate="true" /> <SizeBasedTriggeringPolicy size="40MB" /> </Policies> <DefaultRolloverStrategy max="20"/> <!-- Necessary when generating more than 7 * 40 MB --> </RollingFile> {code} I'm resolving this issue as Not A Problem. Please verify and close. > Multiple threads logging to same AsyncAppender- Data Loss > --------------------------------------------------------- > > Key: LOG4J2-315 > URL: https://issues.apache.org/jira/browse/LOG4J2-315 > Project: Log4j 2 > Issue Type: Bug > Components: Appenders > Reporter: Sudharma Puranik > Assignee: Remko Popma > Priority: Blocker > Attachments: log4j2.xml, ResultStats.java, TestMultiThread.zip > > > creating multiple threads which logs messages. I could see that for 5 million > logging messages only 4.7 million messages are logged. Dont know what is the > reason but this could be something serious for auditing. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org