public function levelToString($level)
    {
        $mapping = [
            self::LOG_LEVEL_DEBUG => 'debug',
            self::LOG_LEVEL_INFO => 'info',
            self::LOG_LEVEL_WARN => 'warn',
            self::LOG_LEVEL_ERROR => 'error',
            self::LOG_LEVEL_FATAL => 'fatal',
        ];
        return isset($mapping[$level]) ? $mapping[$level] : 'unknown';
    }