- /**
- * Mapping a legacy level to the PSR-3 compliant levels
- * @see https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md#5-psrlogloglevel
- *
- * @param int $level the level to be mapped
- *
- * @return string the PSR-3 compliant level
- */
- private static function mapPSR3Level($level)
- {
- switch ($level) {
- case self::WARNING:
- return LogLevel::ERROR;
- case self::INFO:
- return LogLevel::WARNING;
- case self::TRACE:
- return LogLevel::NOTICE;
- case self::DEBUG:
- return LogLevel::INFO;
- case self::DATA:
- return LogLevel::DEBUG;
- case self::ALL:
- return LogLevel::DEBUG;
- default:
- return LogLevel::CRITICAL;
- }
- }
-