Bug 44745 - AsyncAppender fails on changing Throwable
AsyncAppender fails on changing Throwable
Status: RESOLVED FIXED
Product: Log4j
Classification: Unclassified
Component: Appender
1.2
PC Windows XP
: P2 normal
: ---
Assigned To: log4j-dev
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-04-03 07:41 UTC by Julien Aymé
Modified: 2008-08-12 13:33 UTC (History)
0 users



Attachments
The proposed patch. (363 bytes, patch)
2008-04-03 07:41 UTC, Julien Aymé
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Aymé 2008-04-03 07:41:29 UTC
Created attachment 21776 [details]
The proposed patch.

If I use an AsyncAppender to log a Throwable object that is changed after the call
of the logging method, the logging will sometime show up the value changed
afterwards.

(This issue is similar to Bug #43599, excepts that it concerns Throwables).

I propose the following fix (again, same as revision #587252):
in AsyncAppender#append:
     event.getRenderedMessage();
+    event.getThrowableStrRep();

...

which assures that the ThrowableInformation is correctly initialized, and will not change afterwards.
Comment 1 Curt Arnold 2008-08-12 13:33:54 UTC
Committed rev 685304.