[
https://issues.apache.org/jira/browse/LOG4J2-2031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16154970#comment-16154970
]
Colin McDowell commented on LOG4J2-2031:
----------------------------------------
Appreciate you taking time to look at the issue Remko. Here is a sample from
the logged output.
As I mentioned a short distance into the log the output is no longer in
sequence. I deliberately output my own counter at start of each log entry. I
added a '%sn' the log4j2 sequence number. Notice the two counters are not the
same.
000110 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 112
09/06 08:31:16.058 [ main] ERROR
[com.allstate.drivewise.logging.test.CapacityTest:]
000111 123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0 113 09/06 08:31:16.058 [ main]
ERROR [com.allstate.drivewise.logging.test.CapacityTest:]
000112 23456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01 114 09/06 08:31:16.058 [ main]
ERROR [com.allstate.drivewise.logging.test.CapacityTest:]
000113 3456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 012 115 09/06 08:31:16.058 [ main]
ERROR [com.allstate.drivewise.logging.test.CapacityTest:]
000243 MNOPQRSTUVWXYZ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789ABCDEFGHIJKL 116 09/06
08:31:16.065 [ main] ERROR
[com.allstate.drivewise.logging.test.CapacityTest:]
000114 456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123 117 09/06 08:31:16.058 [ main]
ERROR [com.allstate.drivewise.logging.test.CapacityTest:]
000115 56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01234 118 09/06 08:31:16.058 [ main]
ERROR [com.allstate.drivewise.logging.test.CapacityTest:]
000246 PQRSTUVWXYZ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789ABCDEFGHIJKLMNO 119 09/06
08:31:16.065 [ main] ERROR
[com.allstate.drivewise.logging.test.CapacityTest:]
000116 6789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 012345 120 09/06 08:31:16.058 [ main]
ERROR [com.allstate.drivewise.logging.test.CapacityTest:]
000248 RSTUVWXYZ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789ABCDEFGHIJKLMNOPQ 121 09/06
08:31:16.065 [ main] ERROR
[com.allstate.drivewise.logging.test.CapacityTest:]
000117 789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456 122 09/06 08:31:16.058 [
main] ERROR [com.allstate.drivewise.logging.test.CapacityTest:]
000250 TUVWXYZ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789ABCDEFGHIJKLMNOPQRS 123 09/06
08:31:16.065 [ main] ERROR
[com.allstate.drivewise.logging.test.CapacityTest:]
> Log4j2 log file not reflecting application log function calls
> -------------------------------------------------------------
>
> Key: LOG4J2-2031
> URL: https://issues.apache.org/jira/browse/LOG4J2-2031
> Project: Log4j 2
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 2.8.2, 2.9.0
> Environment: Windows, Sun Java 8.
> Reporter: Colin McDowell
> Fix For: 2.9.1
>
> Attachments: CapacityTest.java, log4j2.xml, pom2.xml
>
> Original Estimate: 672h
> Remaining Estimate: 672h
>
> Was hoping to move our numerous J2EE projects from Log4j to Log4j2 for the
> performance improvements. I put together a small test case that writes a
> string pattern to a Rolling File. There is a 6 digit sequence number at the
> start of the log message. This allows me to quickly see if all the log
> requests are making it into the log file. I attach the test case and
> log4j2.xml. The log4j2.xml uses an asynchronous appender.
> What I observe in the output log file is that after a short interval (120 or
> so entries) the logged are appearing in the wrong order, and entries can be
> missing. The missing entries issues especially shows up when rolling to the
> next log file.
> Perhaps there is a deliberate decision to not to guarantee log file
> accurately for speed. However we need the logs to accurately reflect what
> the application is logging. I have also noticed the performance is 25% worse
> in Log4j2 than Log4j when not using the asynchronous appender. So that
> rather kills us using Log4j2 at the moment.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)