Hi,
I have implemented an asynchronous appender that greatly reduces
synchronization. It contains not a single synchronized statement, relies
on naturally thread-safe operations and just uses two classes from the
java.util.concurrent package. Still it is completely thread-safe. I am
using this for logging on J2EE application servers with hundreds of
threads. It can be twice as fast as the AsyncAppender depending on the
scenario. Of course it comes at a price: it may drop LoggingEvents in
peak situations. But that's exactly what I wanted. Better loose some log
than block a thread.
Is there an interest from Log4J developers to include such an appender
in the stock version of Log4J? It's coded against the Log4J-1.2 API and
has a JDK-1.5 dependency. JUnit Test cases are available. Just 250 lines
of code including API doc. I'd be happy to contribute it.
Kind regards
Ortwin Glück
--
[web] http://www.odi.ch/
[blog] http://www.odi.ch/weblog/
[pgp] key 0x81CF3416
finger print F2B1 B21F F056 D53E 5D79 A5AF 02BE 70F5 81CF 3416
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]