1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 17:16:18 +02:00

Fix formatters to handle new levels

This commit is contained in:
Jordi Boggiano
2012-06-19 20:53:33 +02:00
parent c8ca42764c
commit 9dee289dae
3 changed files with 24 additions and 18 deletions

View File

@@ -41,12 +41,14 @@ class GelfMessageFormatter extends NormalizerFormatter
* Translates Monolog log levels to Graylog2 log priorities.
*/
private $logLevels = array(
Logger::DEBUG => LOG_DEBUG,
Logger::INFO => LOG_INFO,
Logger::WARNING => LOG_WARNING,
Logger::ERROR => LOG_ERR,
Logger::CRITICAL => LOG_CRIT,
Logger::ALERT => LOG_ALERT,
Logger::DEBUG => LOG_DEBUG,
Logger::INFO => LOG_INFO,
Logger::NOTICE => LOG_NOTICE,
Logger::WARNING => LOG_WARNING,
Logger::ERROR => LOG_ERR,
Logger::CRITICAL => LOG_CRIT,
Logger::ALERT => LOG_ALERT,
Logger::EMERGENCY => LOG_EMERG,
);
public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_')