[logback-user] How can I monitor the actual size of the asyncappender queue?

haobo liu lhbazazazv at gmail.com
Fri May 28 03:29:42 CEST 2021


maybe ch.qos.logback.core.AsyncAppenderBase#getNumberOfElementsInQueue
 or hack the code add a volatile variable (bad idea)

KARR, DAVID <dk068x at att.com> 于2021年5月28日周五 上午12:02写道:
>
> I believe I now understand the basic mechanics of the AsyncAppender queue, and the tradeoffs of having it small or large.
>
> What's not obvious to me is how I can monitor the utilization of the queue, perhaps in a load test.  I did notice there is a "listener" mechanism, and one example I believe illustrates how I can detect when logs are dropped because the queue is full, but I want to get an idea of how well the queue size is being utilized, or how close it's getting to being full.
> _______________________________________________
> logback-user mailing list
> logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user


More information about the logback-user mailing list