Hi LogBack-Team,
just want to tell you that MDC lacks thread support.
But I'm quite sure that you know that. As soon as you
"leave" a thread the MDC conext (ThreadLocal) will be
lost.
I had implemented something similar to MDC a while ago
and I accompanied my impl with a
ContextPreservingRunnable after a while.
Works like this
CTOR (Source Thread):
ContextPreservingRunnable(Runnable inSubject) {
myMemento = MDC.getMemento();
mySubject = inSubject;
}
RUN-Method (Target Thread):
void run() {
MDC.setMemento(myMemento);
mySubject.run();
MDC.clear();
}
Even though it works for me, it's rather bad that you
have to wrap all Runnables and Callables respectively.
Maybe a ExecutorFacade might server the purpose?
BTW: Does MDC include support for a Subjects
Principals (JAAS)...Please forgive me my showing off
at dev list;-)
__________________________________
Yahoo! Clever - Der einfachste Weg, Fragen zu stellen und Wissenswertes mit
Anderen zu teilen. www.yahoo.de/clever
_______________________________________________
logback-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-dev