Seldaek/monolog — pull request #145 by mlabrum (2013-01-11 01:37:35+00:00)
Title: Syslog Constants vary depending on the OS (windows/linux) so GelfMessageFormatter may submit incorrect error levels to graylog

The issue here is because Windows and linux syslog constants vary (See examples below)
This means that GelfMessageFormatter will submit incorrect log levels when the web server is running on windows.

To solve this, I've replaced the LOG_* PHP constants in GelfMessageFormatter with the correct constant values.

For example these are the syslog constants on Linux.
array(8) {
["LOG_DEBUG"]=>
int(7)
["LOG_INFO"]=>
int(6)
["LOG_NOTICE"]=>
int(5)
["LOG_WARNING"]=>
int(4)
["LOG_ERROR"]=>
int(3)
["LOG_CRITICAL"]=>
int(2)
["LOG_ALERT"]=>
int(1)
["LOG_EMERGENCY"]=>
int(0)
}

And now these are the constants on Windows.
array(8) {
'LOG_DEBUG' =>
int(6)
'LOG_INFO' =>
int(6)
'LOG_NOTICE' =>
int(6)
'LOG_WARNING' =>
int(5)
'LOG_ERROR' =>
int(4)
'LOG_CRITICAL' =>
int(1)
'LOG_ALERT' =>
int(1)
'LOG_EMERGENCY' =>
int(1)
}

Thanks