[bug] Wrong SyslogFormatter priority in some cases
dkarlovi opened this issue · comments
Dalibor Karlović commented
Monolog version 3.4.0
Using the SyslogFormatter (not SyslogHandler), it seems the priorities are messed up in some way. I've gotten these lines
<15>1 2023-07-03T10:10:59.609863+00:00 d21c8cede87b - 10 doctrine - DEBUG: Executing query: SELECT * FROM doctrine_migration_versions {"sql":"SELECT * FROM doctrine_migration_versions"}
<15>1 2023-07-03T10:10:59.610462+00:00 d21c8cede87b - 10 doctrine - DEBUG: Executing query: SELECT DATABASE() {"sql":"SELECT DATABASE()"}
<14>1 2023-07-03T10:10:59.625648+00:00 d21c8cede87b - 10 doctrine - INFO: Disconnecting
<14>1 2023-07-03T10:10:59.643189+00:00 d21c8cede87b - 9 request - INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"415bdb"},"request_uri":"https://example.local/_wdt/415bdb","method":"GET"}
Notice the (syslog) priority is always 10, for either INFO
or DEBUG
, but then I also get 9 for INFO
? 🤔
If I use lnav and set the command :set-min-log-level info
, I get both INFO
and DEBUG
. Seems the syslog priority calculation is off in some way?
Dalibor Karlović commented
Nevermind, this is the proc ID, the priority is leading. 🙈