We want to set up or log4j configuration with thread specific log files.
I've been through many archives and have seen several suggestions, but
I'm still looking for a solution better aligned to our needs.  I'll
summarize the solutions I've already stumbled across in case there was
something I overlooked.   If you have suggestions, please provide a
little bit of detail or references to same.

1) Don't do it.  Add some kind of content to the message (e.g. thread
name in the conversion pattern, output context added via the NDC or MDC
classes).  Filter the single log file everything is logged to as a
post-processing exercise.   Might work for one of our situations.

2) Define multiple appenders in the configuration file and create the
loggers by name.  Might work in some of our situations where the
threading configuration is static or predictable (and small).  

3) Did see an older reference to something referred to as a 'context
sensitive appender' which someone had provided code for.  This was
promising, because a simple context-sensitive configuration definition
would cover multiple loggers/appenders/files.  Unfortunately, I was
unable to unzip the attached zip file and the author references had been
sanitized (and likely too old to be valid anyway).

Reply via email to