Gets the name of the logging level.

@param  int $level
@return string
@throws CM_Exception_Invalid
338444
public static function getLevelName($level) {
        $level = (int) $level;
        if (!isset(self::$_levels[$level])) {
            throw new CM_Exception_Invalid('Level is not defined', null, [
                'level'           => $level,
                'availableLevels' => implode(', ', array_keys(self::$_levels)),
            ]);
        }
        return self::$_levels[$level];
    }
563354
public static function logLevel($level)
    {
        if (is_numeric($level)) {
            if ($level == Teamspeak::LOGLEVEL_CRITICAL) {
                return "CRITICAL";
            }
            if ($level == Teamspeak::LOGLEVEL_ERROR) {
                return "ERROR";
            }
            if ($level == Teamspeak::LOGLEVEL_DEBUG) {
                return "DEBUG";
            }
            if ($level == Teamspeak::LOGLEVEL_WARNING) {
                return "WARNING";
            }
            if ($level == Teamspeak::LOGLEVEL_INFO) {
                return "INFO";
            }

            return "DEVELOP";
        } else {
            if (strtoupper($level) == "CRITICAL") {
                return Teamspeak::LOGLEVEL_CRITICAL;
            }
            if (strtoupper($level) == "ERROR") {
                return Teamspeak::LOGLEVEL_ERROR;
            }
            if (strtoupper($level) == "DEBUG") {
                return Teamspeak::LOGLEVEL_DEBUG;
            }
            if (strtoupper($level) == "WARNING") {
                return Teamspeak::LOGLEVEL_WARNING;
            }
            if (strtoupper($level) == "INFO") {
                return Teamspeak::LOGLEVEL_INFO;
            }

            return Teamspeak::LOGLEVEL_DEVEL;
        }
    }
426663
public static function toMonologLevel($level)
    {
        if (is_string($level) && defined(__CLASS__.'::'.strtoupper($level))) {
            return constant(__CLASS__.'::'.strtoupper($level));
        }

        return $level;
    }
364002
private function getSyslogPriority(\n2n\log4php\LoggerLevel $level) {
		if($this->overridePriority) {
			return $this->intPriority;
		}
		return $level->getSyslogEquivalent();
	}
453547
public static function findFlagStabilityName($level)
    {
        $stability = 'dev';

        /** @var string $stabilityName */
        /** @var int $stabilityLevel */
        foreach (Package::$stabilities as $stabilityName => $stabilityLevel) {
            if ($stabilityLevel === $level) {
                $stability = $stabilityName;

                break;
            }
        }

        return $stability;
    }
982886
public static function getLevel($level = null) {

        $level = strtoupper($level);

        if ( array_key_exists($level, self::$levels) ) return self::$levels[$level];

        return self::$levels[self::DEFAULT_LOG_LEVEL];

    }
1089652
protected function parseLevel( $level )
	{
		if ( isset( $this->levels[$level] ) )
			return $this->levels[$level];

		throw new InvalidArgumentException( 'Invalid log level.' );
	}
305798
public static function getLevelByName($level)
    {
        $level = strtoupper($level);
        if (!isset(static::$levelNameToLevel[$level])) {
            return static::ALL;
        }

        return static::$levelNameToLevel[$level];
    }
1344420
private function loggerLevel($level)
    {
        switch ($level) {
            case 'trace':
            case 'debug':
                return Logger::DEBUG;
                break;

            case 'info':
                return Logger::INFO;
                break;

            case 'notice':
                return Logger::NOTICE;
                break;

            case 'warn':
            case 'warning':
                return Logger::WARNING;
                break;

            case 'error':
                return Logger::ERROR;
                break;

            case 'crit':
            case 'critical':
                return Logger::CRITICAL;
                break;

            case 'alert':
                return Logger::ALERT;
                break;

            case 'emergency':
                return Logger::EMERGENCY;
                break;

            default:
                throw new \Exception('Unknown Log Level', 1);
                break;
        }
    }
42601
private function getLevel($level)
    {
        $result = \common_Logger::TRACE_LEVEL;
        switch ($level) {
            case 'fatal' :
                $result = \common_Logger::FATAL_LEVEL;
                break;
            case 'error' :
                $result = \common_Logger::ERROR_LEVEL;
                break;
            case 'warn' :
                $result = \common_Logger::WARNING_LEVEL;
                break;
            case 'info' :
                $result = \common_Logger::INFO_LEVEL;
                break;
            case 'debug' :
                $result = \common_Logger::DEBUG_LEVEL;
                break;
            case 'trace' :
                $result = \common_Logger::DEBUG_LEVEL;
                break;
        }
        return $result;
    }
132565
private function getPhalconLoggerLevel($level)
    {
        $levelMap = [
            LogLevel::INFO => PhalconLogLevel::INFO,
            LogLevel::DEBUG => PhalconLogLevel::DEBUG,
            LogLevel::ALERT => PhalconLogLevel::ALERT,
            LogLevel::CRITICAL => PhalconLogLevel::CRITICAL,
            LogLevel::EMERGENCY => PhalconLogLevel::EMERGENCY,
            LogLevel::ERROR => PhalconLogLevel::ERROR,
            LogLevel::NOTICE => PhalconLogLevel::NOTICE,
            LogLevel::WARNING => PhalconLogLevel::WARNING
        ];

        return ArrayUtils::getValue($levelMap, $level, PhalconLogLevel::INFO);
    }
556864
protected function getCallerByLevel($level)
    {
        $level+=1;
        $backtrace=debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, static::MAX_TRACE_LEVEL);
        $caller_class=$backtrace[$level]['class']??'';
        if ($this->dn_class && (is_subclass_of($this->dn_class, $caller_class) || $this->dn_class===$caller_class)) {
            $caller_class=$backtrace[$level+1]['class']??'';
        }
          

        return $caller_class;
    }
1091509
protected function getLevelName($level)
    {
        return in_array($level, self::$levels) ? array_search($level, self::$levels) : '--';
    }
1026314
public static function getVerbosityForLevel($level) {
        if ($level === 0) {
            return self::NORMAL;
        }

        if ($level === 1) {
            return self::VERBOSE;
        }

        if ($level === 3) {
            return self::SILENT;
        }

        return self::DEBUG;
    }
849850
public function logLevel($level)
    {
        if (!is_numeric($level)) {
            return $level;
        }

        try {
            return ucfirst(strtolower(\Monolog\Logger::getLevelName($level)));
        } catch (\Exception $e) {
            return $level;
        }
    }
778765
public String getNameAt(int level) {
    return this.levelwiseNames[level] instanceof Integer ? this.levelwiseNames[level].toString() : (String) this.levelwiseNames[level];
  }
606653
public function Level($level)
    {
        $parent = $this;
        $stack = array($parent);
        while ($parent = $parent->Parent) {
            array_unshift($stack, $parent);
        }

        return isset($stack[$level-1]) ? $stack[$level-1] : null;
    }