Logj2's locking doesn't resemble Log4j's at all.  I will create a unit test 
when I have a few minutes for this use case to insure it doesn't happen.  
However, I would also argue that with Java 5 holding a lock while calling 
logger.debug should never happen.  Even if Log4j2 itself doesn't cause a 
deadlock, with this kind of locking going on it could easily happen within an 
appender.

Ralph

On May 4, 2012, at 5:14 AM, Piers Uso Walter wrote:

> This is slightly off topic, but please be aware that if you log generic 
> objects (as opposed to strings), you may run into a race condition that is 
> tracked as bug #24159.
> 
> When using log4j with JBoss, this potentially causes the whole JBoss server 
> to hang.
> Our customers were not amused, when they ran into this...
> 
> I do not believe that this is fixed yet in log4j 1.x
> 
> With kind regards
> 
> Piers
> 
> -- 
> Piers Uso Walter <[email protected]>
> ilink Kommunikationssysteme GmbH
> 
> 
> Am 04.05.2012 um 14:08 schrieb Gary Gregory:
>> What I DO need though is bulk logging where I can pass in an array of 
>> messages:
>> 
>> logger.debug(List<?>) (or Collection?)
>> logger.debug(Object[])
>> logger.debug(Properties)
>> 
>> For example, I'd like to be able to do:
>> 
>> logger.debug(System.getProperties());
>> 
>> and have it log one entry per property. I am not sure what the format of 
>> each entry is but a sensible default can be provided.
>> 
>> Gary
>> 
>> -- 
>> E-Mail: [email protected] | [email protected] 
>> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
>> Spring Batch in Action: http://bit.ly/bqpbCK
>> Blog: http://garygregory.wordpress.com 
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
> 
> 
> 
> 

Reply via email to