Closed philmcmahon closed 5 years ago
How does this compare to the approach suggested in #24 with an AsyncAppender wrapper?
https://logback.qos.ch/manual/appenders.html#AsyncAppender says that it is automatically lossy, so could replace the circuit breaking feature as well. Bonus is that it is only lossy for INFO / TRACE / DEBUG messages.
Interestingly, this is the default config of Play when in PROD (see https://www.playframework.com/documentation/2.6.x/SettingsLogger#Default-configuration)
Sounds good, and would reduce the implementation complexity. Any thoughts @QuarpT ?
Are you certain the AsyncAppender doesn't block on error messages when the queue is full @philmcmahon @sihil ?
You need to make sure you set neverBlock to true to drop all messages once the queue fills up: https://logback.qos.ch/manual/appenders.html#asyncNeverBlock
See https://github.com/guardian/ophan/blob/master/shared-lib/src/main/scala/ophan/util/ElkLogging.scala#L69 for the example in Ophan.
Closing this in favour of the AsyncAppender approach.
We've taken this approach for all discussion apps, seems worth highlighting