Re: Log4j2 ThreadContext for child threads

2016-04-27 Thread Benjamin Jaton
That's awesome! I didn't know about http://docs.oracle.com/javase/6/docs/api/java/lang/InheritableThreadLocal.html Thanks Remko On Tue, Apr 26, 2016 at 5:12 PM, Remko Popma wrote: > There you go! It's documented near the bottom of the manual page: > > http://logging.apache.org/log4j/2.x/manual/

Re: Log4j2 ThreadContext for child threads

2016-04-26 Thread Remko Popma
There you go! It's documented near the bottom of the manual page: http://logging.apache.org/log4j/2.x/manual/thread-context.html Sent from my iPhone > On 2016/04/27, at 8:58, Benjamin Jaton wrote: > > Hi all, > > I am using the ThreadContext a lot, but I am sometimes in a situation where >

Re: Log4j2 ThreadContext for child threads

2016-04-26 Thread Remko Popma
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 wrote: > > Hi all, > > I am using the ThreadCont

Log4j2 ThreadContext for child threads

2016-04-26 Thread Benjamin Jaton
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 manua