logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Jaton <benjamin.ja...@gmail.com>
Subject Log4j2 ThreadContext for child threads
Date Tue, 26 Apr 2016 23:58:32 GMT
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.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message