[logback-user] not logging every message even with discardingThreshold set to 0

David Roussel nabble at diroussel.xsmail.com
Fri May 6 20:26:08 UTC 2016


Hi,

The AsyncAppender is not very complex. You can inspect the code to see how it works. As you can see that code will get very congested with 200 threads contending for one lock. 

I would suggest using less threads. Using s non blocking web server. Or using log4j 2.0 with it's disruptor based async logging. 

David

> On 6 May 2016, at 19:59, Marcus Chen <marcus.chen at dev9.com> wrote:
> 
> Hi,
> We have a SpringBoot app that uses Logback. It uses Async appender and configured as this:
> <appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
>     <queueSize>10000</queueSize>
>     <discardingThreshold>0</discardingThreshold>
>     <appender-ref ref="FILE" />
> </appender>
> 
> <root level="INFO">
>     <appender-ref ref="ASYNC" />
> </root>
> The app (single instance) is configured to have up to 200 Jetty threads. Throughput is around 50 POSTs/sec. I find there are 2-4 minute gaps in messages logged after 30 minutes. The gaps appear every 20 to 30 minutes. Am I missing additional configurations? Also is Async appender the best way to go if logging fidelity is of high importance? If not what is the best configuration so not to lose any messages. Thanks in advance.
> ________________________________________________________
> MARCUS CHEN – Senior Developer, AWS Certified Developer Associate
> marcus.chen at dev9.com | dev9.com
> Custom Software. Continuous Delivery.
> 
> _______________________________________________
> logback-user mailing list
> logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20160506/a9ea9940/attachment.html>


More information about the logback-user mailing list