[ 
https://issues.apache.org/jira/browse/LOG4J2-2899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17166008#comment-17166008
 ] 

ASF subversion and git services commented on LOG4J2-2899:
---------------------------------------------------------

Commit 23e8572b8a52504e318bf925e34381edbbf3c1a3 in logging-log4j2's branch 
refs/heads/master from Carter Kozak
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=23e8572 ]

LOG4J2-2899: Fix log4j-1.2-api LogEventWrapper thread data accessors


> LogEventWrapper.getThread only works on the first invocation
> ------------------------------------------------------------
>
>                 Key: LOG4J2-2899
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2899
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: log4j 1.2 emulation
>    Affects Versions: 2.13.3
>            Reporter: Carter Kozak
>            Assignee: Carter Kozak
>            Priority: Major
>             Fix For: 2.14.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> LogEventWrapper.getThread attempts to memoize the thread value but returns 
> null if the thread field is already set where it should return the field 
> value.
>  
> Additionally the thread is discovered using Thread.getAllStackTraces which is 
> an expensive operation. In most cases it should be sufficient to check only 
> the current thread, if the getThread method is called from another thread 
> there's no guarantee that the original thread still uses the same name, or 
> that it still exists.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to