[logback-user] Dumping a CyclicBuffer

Ceki Gulcu listid at qos.ch
Thu Oct 16 00:18:18 CEST 2008


Hello,

Thank you for the attached files showing what you have come up with.

While the dump trigger is clear (a log statement of level error or
whatever the triggering threshold is), I don't see a "start
accumulation" trigger.

If I understand correctly, during the dump all events currently in the
cyclic buffer will be dumped. If the buffer size is large, then all
events up to the previous error will be dumped. If the buffer size is
small, too few events may be dumped. Hence my question about the
"start accumulation" trigger.

Cheers,

mweeda wrote:
> Thanks for your help, Ceki.
> 
> The attached files will show you what I came up with. Synchronization issues
> are avoided by having the same Appender add events to the CyclicBuffer and
> dump its contents. Ease of use is pretty high, since log.error(message)
> triggers a buffer dump. Configuration changes would allow log.X and higher
> to trigger a dump.
> 
> -- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch


More information about the Logback-user mailing list