logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
Subject Re: Log4j2 ThreadContext for child threads
Date Wed, 27 Apr 2016 00:02:50 GMT
If I remember correctly there is a system property to allow the ThreadContext to be visible
from child threads. (False by default.)

Away from PC now, can't check the property name...

Sent from my iPhone

> On 2016/04/27, at 8:58, Benjamin Jaton <benjamin.jaton@gmail.com> wrote:
> 
> Hi all,
> 
> I am using the ThreadContext a lot, but I am sometimes in a situation where
> I would need to set some variable for a task that runs in a thread that
> might spawn children threads. I need that logging variable to be also
> available to those child threads.
> 
> Unless I create the sub threads manually and pass the variable myself, it's
> not possible for a thread to know where it comes from and grab the variable
> from its ancestors right?
> 
> Just asking because maybe someone has run into the same problem.
> 
> Thanks!
> Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message