[slf4j-dev] [Bug 52] New: nlog4j log corruption problems under load in custom configuration
bugzilla-daemon at pixie.qos.ch
bugzilla-daemon at pixie.qos.ch
Fri Jun 29 07:04:27 CEST 2007
http://bugzilla.slf4j.org/show_bug.cgi?id=52
Summary: nlog4j log corruption problems under load in custom
configuration
Product: SLF4J
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: blocker
Priority: P1
Component: Implementations
AssignedTo: dev at slf4j.org
ReportedBy: nrhope at gmail.com
Using nlog4j 1.2.25 which doesn't appear in bugzilla version choices.
Need to dynamically create appenders which are intended to have only one logger
writing to them, which works fine normally, but under heavy load (even on
single CPU machine) get:
1. log messages appearing in the wrong appender's file
2. partial log messages (missing headers etc).
=== email I sent to the user list included below
I am in the final stages of preparing a release that builds on top of ApacheDS,
and consequently must use an slf4j compliant logging library so I used nlog4j
1.2.25 (as AD does).
I have a requirement to have separate appenders created dynamically at runtime
and adopted the approach shown in the small attached test/config files, which
was:
1. to have a template appender copied every time a new appender is required
2. have a stub logger used only so that I can discover the template appender
when I need it (as the template appender is in this loggers appender list in
the .properties config file)
3. to dynamically create a logger intended to send output to the dynamically
created appender only (additivity is false and no other logger knows about each
particular appender instance).
This all works fine under normal load, but noted some problems under heavy
logging load so I wrote the stand alone test to investigate.
Running the test with 2 threads and no delay ("java nlog4jtest.NLog4jTest 2 0")
causing problems immediately on a dual core laptop running windows xp:
1. log messages from one logger appear against appenders to which they are
not linked
2. partial log messages are evident, where headers are missing etc.
Using a delay of 5 milliseconds improved the situation but still both problems
were evident.
On a single cpu windows box running xp, "java nlog4jtest.NLog4jTest 10 0" also
evidenced both problems too.
I know I'm making use of a bespoke approach here, so I'm hoping I'm doing
something wrong in my implementation or breaking some contract I'm not aware
of. I basically can't ship with logging in this state and can't migrate to
logback due to LGPL license, which is a problem for the ApacheDS project too.
Any expert advice about alternative implementation approaches or how to best
approach debugging would be greatly appreciated.
--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the slf4j-dev
mailing list