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

Remko Popma commented on LOG4J2-2052:
-------------------------------------

I would prefer to keep the default as is, and this may be one way to do it.
However, version detection is fragile and is one of the notable changes in java 
9, but let's see what is possible. 
Do you think you would be able to provide a patch or pull request for this?

> Disable thread name caching by default
> --------------------------------------
>
>                 Key: LOG4J2-2052
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2052
>             Project: Log4j 2
>          Issue Type: Improvement
>            Reporter: Dan Berindei
>            Priority: Minor
>
> We run our tests in parallel with TestNG and we use {{Thread.setName()}} for 
> easy filtering of log messages from a single test. But since LOG4J2-1334, all 
> the thread names are logged as {{TestNG}}, unless we use 
> {{-DAsyncLogger.ThreadNameStrategy=UNCACHED}}.
> JDK 8u102 removed the {{String}} allocation in {{Thread.getName()}} 
> (https://bugs.openjdk.java.net/browse/JDK-8148842), so I suggest changing the 
> default strategy to {{UNCACHED}}. Users of older JDKs will still be able to 
> use {{-DAsyncLogger.ThreadNameStrategy=CACHED}} for the performance 
> improvement.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to