Generally it doesn’t make sense to expect ThreadLocal lookups to work with 
async appender/loggers. Another lookup should be used. 

I haven’t looked at the code but I expect that the subject is cached somehow. 
Perhaps this should be changed (to no caching) so that the user experience is 
consistent. 

(Shameless plug) Every java main() method deserves http://picocli.info

> On Dec 1, 2017, at 6:05, Matt Sicker <[email protected]> wrote:
> 
> I'm not sure if this use case makes much sense. Dynamic data like that
> makes more sense in the message itself, though I'm sure there are several
> ways to do this.
> 
>> On 30 November 2017 at 15:02, Mikael Ståldal <[email protected]> wrote:
>> 
>> I am looking at https://issues.apache.org/jira/browse/LOG4J2-2007
>> 
>> What is the expected behavior here? Should there be any thread context for
>> header/footer?
>> 
>> I guess it should be consistent for sync and async logging, which it isn't
>> right now. But maybe the async case is correct in not includin any thread
>> context in header/footer, and the sync case incorrect?
>> 
> 
> 
> 
> -- 
> Matt Sicker <[email protected]>

Reply via email to