Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logging in Play non-blocking?

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.

like image 893
missingfaktor Avatar asked Oct 15 '13 07:10

missingfaktor


2 Answers

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.

like image 179
Alexey Romanov Avatar answered Sep 19 '22 02:09

Alexey Romanov


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

like image 24
Will Sargent Avatar answered Sep 18 '22 02:09

Will Sargent