Details
-
Wish
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Most components of log4j 1.2 are not inherently thread-safe but depend on locks that are acquired after the threshold check and are not released until processing is completed. Unless the AsyncAppender is used, this effectively limits log4j 1.2 to handlng only one logging request at a time.
Core classes in log4j 2.0 should not depend on external synchronization for thread safety.
Immutable classes should be preferred in the logging pipeline.
Class attributes (aka @Immutable and @ThreadSafe) should be used to document thread-safety.