Logging in Play non-blocking?
Asked Answered
H

3

6

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.

Hydrocellulose answered 15/10, 2013 at 7:44 Comment(0)
K
4

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.

Kite answered 17/10, 2013 at 7:38 Comment(0)
L
4

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

Loaiasis answered 29/6, 2014 at 21:22 Comment(0)
H
0

In Play 2.6, it is blocking in DEV mode and async in production. https://www.playframework.com/documentation/2.6.x/SettingsLogger

Hock answered 4/11, 2017 at 15:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.