Niels Bøg created LOG4J2-1085:
---------------------------------
Summary: RollingRandomAccessFile rolling files incorrectly
Key: LOG4J2-1085
URL: https://issues.apache.org/jira/browse/LOG4J2-1085
Project: Log4j 2
Issue Type: Bug
Components: Appenders
Affects Versions: 2.3
Environment: Windows 8 64bit, Weblogic Server 12.1.2
Reporter: Niels Bøg
Priority: Critical
Fix For: 2.4
Implemented Loggers using RollingRandomAccessFile appender with
this configuration:
<RollingRandomAccessFile name="SystemAppender"
filename="${fileLogDir}/system.log"
filePattern="${fileLogDir}/$${date:yyyy-MM}/system-%d{yyyy-MM-dd}-%i.log"
append="false">
....
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="${fileSize}"/>
<!--TimeBasedTriggeringPolicy/-->
</Policies>
<DefaultRolloverStrategy max="${numGenerations}"/>
...
Ran a test writing 5'000 log events (each approx. 500 bytes long) to 1 file
with fileSize=100 KB & numGenerations=5.
Result: system.log file partly contained content from system-2015-07-27-5.log
file (found entries 4795-5000 as expected, but unexpectedly also found entries
4783-4794 of gen. 5 file there).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]