[logback-user] Is grouped (deferred) log statements from same threads possible using logback?

janolaveide at gmail.com janolaveide at gmail.com
Thu Mar 7 19:21:35 CET 2013

I have read about the Mapped Diagnostic Context, and although useful, the
log statements from different threads still appear interspersed in the

What I would like is to have all log statements from a thread outout
consecutively when that thread is done (and I know what and when "done" is)

For example :

Thread A starts at time T-Astart, performs logging at various points, and is
done at T-Adone.

Before A is done, at time T-Bstart (T-Adone < T-Bstart < T-Adone) another
thread B starts processing, does the same kind of logging and finishes at

Now, I would like all logging statements from thread A to appear before the
logging statements from Thread B, and not interspersed as the MDC examples I
have seen. Is this kind of deferred, grouped logging possible with logback ?

View this message in context: http://logback.10977.n7.nabble.com/Is-grouped-deferred-log-statements-from-same-threads-possible-using-logback-tp11522.html
Sent from the Users mailing list archive at Nabble.com.

More information about the Logback-user mailing list