Return an error level string for the given PHP error level.

@param int $level
@return string An error level string.
326854
public static function getErrorLevelString($level)
    {
        switch ($level) {
            case E_PARSE:
                return 'CRITICAL';
            case E_ERROR:
            case E_CORE_ERROR:
            case E_COMPILE_ERROR:
            case E_USER_ERROR:
            case E_RECOVERABLE_ERROR:
                return 'ERROR';
            case E_WARNING:
            case E_CORE_WARNING:
            case E_COMPILE_WARNING:
            case E_USER_WARNING:
                return 'WARNING';
            case E_NOTICE:
            case E_USER_NOTICE:
                return 'NOTICE';
            case E_STRICT:
                return 'DEBUG';
            default:
                return 'NOTICE';
        }
    }
122663
public function level($level)
    {
        if (empty($level)) {
            $level = [];
        } elseif (is_string($level)) {
            $level = explode(',', str_replace(' ', '', $level));
        } else {
            $level = is_array($level) ? $level : func_get_args();
        }

        $this->setLevel($level);

        return $this;
    }
999053
public static function getLevelName($level)
    {
        static $levels = [
            Logger::LEVEL_ERROR => 'error',
            Logger::LEVEL_WARNING => 'warning',
            Logger::LEVEL_INFO => 'info',
            Logger::LEVEL_TRACE => 'debug',
            Logger::LEVEL_PROFILE_BEGIN => 'debug',
            Logger::LEVEL_PROFILE_END => 'debug',
        ];

        return isset($levels[$level]) ? $levels[$level] : 'error';
    }
138489
public static function getErrorStr($errors){
		$str = '';
		if(is_array($errors)){
			foreach($errors as $field=>$error_k){
				$str .= $field.':'.implode(",",$error_k)." <br/>";
			}
		}
		return $str;
	}
557633
protected function formatErrors() : string
    {
        $errors = implode(PHP_EOL, $this->getErrorMessages());

        return PHP_EOL . PHP_EOL . $errors . PHP_EOL;
    }
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;
    }
1212905
public function getAttachmentColor(int $level): string
    {
        switch (true) {
            case $level >= Logger::ERROR:
                return static::COLOR_DANGER;
            case $level >= Logger::WARNING:
                return static::COLOR_WARNING;
            case $level >= Logger::INFO:
                return static::COLOR_GOOD;
            default:
                return static::COLOR_DEFAULT;
        }
    }
1305740
protected function parseLevel($level)
	{
		switch ($level)
		{
			case 'debug':
				return MonologLogger::DEBUG;

			case 'info':
				return MonologLogger::INFO;

			case 'notice':
				return MonologLogger::NOTICE;

			case 'warning':
				return MonologLogger::WARNING;

			case 'error':
				return MonologLogger::ERROR;

			case 'critical':
				return MonologLogger::CRITICAL;

			case 'alert':
				return MonologLogger::ALERT;

			case 'emergency':
				return MonologLogger::EMERGENCY;

			default:
				throw new \InvalidArgumentException("Invalid log level.");
		}
	}
1184807
public function getTld($level = null)
    {
        if (is_null($level)) {
            return implode('.', $this->tlds);
        } elseif (isset($this->tlds[ $level ])) {
            return $this->tlds[ $level ];
        }

        return false;
    }
361451
protected function normalizeLevel($level)
    {
        if (isset($this->logLevelMap[$level])) {
            return $this->logLevelMap[$level];
        }
        return strtolower($level);
    }
985233
public function error($string, $level = null)
    {
        $this->out->level($level)->writeln("<error>$string</error>");
        
        return $this;
    }
876564
protected function get_error()
    {
        $query = $this->database->getQueryCollection()->findQuery($this->strQuery);

        if ($query) {
            return $query->error();
        }

        return '';
    }
957171
protected static function _getLogLevel( $level = LoggingLevels::INFO, $fullName = false )
    {
        static $_logLevels = null;

        if ( empty( $_logLevels ) )
        {
            $_logLevels = LoggingLevels::getDefinedConstants();
        }

        $_levels = ( is_string( $level ) ? $_logLevels : array_flip( $_logLevels ) );

        if ( null === ( $_tag = Option::get( $_levels, $level ) ) )
        {
            $_tag = 'INFO';
        }

        return ( false === $fullName ? substr( strtoupper( $_tag ), 0, 4 ) : $_tag );
    }
372678
private function getFilters(array $filters, $level)
    {
        if (empty($filters)) {
            return '';
        }

        $name     = array_shift($filters);
        $method   = $this->getFindMethod($name);
        $filter   = ($method !== 'last') ? var_export($name, true) : '';
        $callable = $this->getCallable('$filter');
        $msg      = var_export($name, true);

        return sprintf($this->prepare(self::FILTER, $level), $method, $filter, $callable, $msg, $this->getFilters($filters, $level));
    }
521504
public function getLogLevelName($level):string
    {
        return isset(self::$levels[$level])?self::$levels[$level]:'';
    }
1171104
public static function getLevelNumber($level)
    {
        $levels = Logger::getLevels();

        if (!isset($levels[$level])) {
            throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', $levels));
        }

        return $levels[$level];
    }
305798
public static function getLevelByName($level)
    {
        $level = strtoupper($level);
        if (!isset(static::$levelNameToLevel[$level])) {
            return static::ALL;
        }

        return static::$levelNameToLevel[$level];
    }