Is logging in Play non-blocking? Does it use some non-blocking IO API behind the scenes? Does it schedule on some other thread pool? I tried looking at the code but couldn't figure it out from there.
Logging in Play non-blocking?
Asked Answered
The documentation just says it uses logback, so I'd assume it is blocking by default and you can use AsyncAppender
(note caveats) if you want async logging.
The logging is blocking by default, but you can configure Logback to use an AsyncAppender. Note that AsyncAppender is lossy -- it will discard debug messages if the queue is full for better performance.
http://www.playframework.com/documentation/2.3.x/SettingsLogger
In Play 2.6, it is blocking in DEV mode and async in production. https://www.playframework.com/documentation/2.6.x/SettingsLogger
© 2022 - 2024 — McMap. All rights reserved.