logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jess Holle <je...@ptc.com>
Subject Re: Proposed synchronization changes
Date Mon, 19 May 2008 15:22:09 GMT
Jess Holle wrote:
> Thanks.
> I'm also starting to ponder whether there's a mostly compatible way to 
> reduce locking in AppenderSkeleton and WriterAppender.
> For instance, we could add a special Layout interface that would allow 
> the String to be pre-computed prior to holding the lock (but after 
> filters and thresholds).
> That's just an idea, but I'm looking for something that does any 
> message to String conversion and formatting without holding a lock on 
> the Appender, which would be a source of potential deadlock and 
> unnecessarily limit the (multi-threaded) throughput of log4j.
Argh!  Popular layouts, e.g. PatternLayout, are far from thread safe.  
The only thing that saves them today is that they are used in a 
single-threaded manner due to the locking in AppenderSkeleton.

Jess Holle

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message