Reputation: 681
I am using logback AsyncAppender currently and it does reduce logging latency largely. However, I still spot some large latency intermittently. Check below two consecutive logging, the latency is 488ms which is unexplained
2023-04-24 05:42:05.446 [SofaBizProcessor-5-thread-4] INFO[06023f5c168234012297211431566]search (rule,keyword) mappings with key: isContainerLink
2023-04-24 05:42:05.934 [SofaBizProcessor-5-thread-4] WARN[06023f5c168234012297211431566]no (rule,keyword) mapping are present, try to match directly with key: isContainerLink
My logback configuration is
<!-- neverBlock true means possible loss of logging events in case of full queue -->
<appender name="ASYNC_MODULE_APPENDER" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="MODULE_APPENDER" />
<queueSize>1024</queueSize>
<discardingThreshold>0</discardingThreshold>
<neverBlock>true</neverBlock>
</appender>
I am expecting no latency/blocking at all since I specify neverBlock=true
Any ideas?
Upvotes: 0
Views: 397