https://issues.apache.org/bugzilla/show_bug.cgi?id=46404





--- Comment #8 from Hanno Neuer <[email protected]>  2009-04-07 23:00:42 
PST ---
Thanks for looking into this.

This patch solves the problem for the SocketAppender but it will remain for
other appenders.

Two appenders which I manually checked for the problem (allthough I didn't try
to run the code):
  - SocketHubAppender (also uses ObjectOutputStream, same as in SocketAppender)
  - JDBCAppender (should result in a ConcurrentModificationException while
flushing the buffer)

I haven't looked into other appenders beside these two, but I assume there will
be more places where the problem occurs.

A more general solution is to make sure that the two lines
 +    event.getRenderedMessage();
 +    event.getThrowableStrRep();
are called before the actual call to AppenderSkeleton#append is done in
AppenderSkeleton#doAppend. 

I am not sure about the performance or other impacts of this solution so I want
you Log4j guys to check it for feasibility.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to