Only thing I can think of offhand is an issue with ReusableLogEventFactory.
I don't see anything in the 2.8 changelog fixing anything related. Could
you try disabling GC-free mode? <
https://logging.apache.org/log4j/2.x/manual/garbagefree.html>

I'm sure Remko will have some ideas when he's online. :)

On 15 February 2017 at 21:37, Leon Finker <leon...@gmail.com> wrote:

> Hi,
>
> Is there any thread name caching going on with log4j2 (doesn't matter
> sync/async)? If I have a thread pool of tasks and call
> Thread.currentThread().setName (with unique id) in the beginning of the
> task execution, I sometimes see reuse of previous thread name in the log
> statements. Id is UUID, so it's definitely unique. And if I do System.out
> on the current thread name after setting it, I do see the new name as
> expected. But in log statements the thread name is from the previous set.
> The pattern layout is: [%date{DEFAULT}{UTC}Z][%level][%thread:%tid][%c{3}]
> %message%n
>
> log4j:2.7
>
> Any ideas what could be causing the thread name reuse?
>
> Thank you
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-dev-h...@logging.apache.org
>
>


-- 
Matt Sicker <boa...@gmail.com>

Reply via email to