logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niels Bøg (JIRA) <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1085) RollingRandomAccessFile rolling files incorrectly
Date Mon, 27 Jul 2015 14:44:06 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14642800#comment-14642800
] 

Niels Bøg commented on LOG4J2-1085:
-----------------------------------

Question: Ran a 2nd test with 1'200 entries in sequence like: 1, 2, 3, 4, 5 .... but found
1,2,4,5,3 ... 
Does this appender guarantee that entries will be written in correct sequence?
(Could be a problem in my simple test app!)

> 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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message