From this answer https://stackoverflow.com/a/25125159/4367326 I have routingAppender
working but I want to set the ThreadContext
for every thread in the program.
When I set
ThreadContext.put("logFileName", "TestLogFile");
it works for the main thread and logs as expected but not for any other threads in my application. How can I achieve this?