Logging/src/PsrLogger.php
private function validateLogLevel($level)
    {
        $map = Logger::getLogLevelMap();
        $level = (string) $level;

        if (isset($map[$level]) || isset(array_flip($map)[strtoupper($level)])) {
            return true;
        }

        throw new InvalidArgumentException("Severity level '$level' is not defined.");
    }
private function validateLogLevel($level)
    {
        $map = Logger::getLogLevelMap();
        $level = (string) $level;

        if (isset($map[$level]) || isset(array_flip($map)[strtoupper($level)])) {
            return true;
        }

        throw new InvalidArgumentException("Severity level '$level' is not defined.");
    }
private function validateLogLevel ( $ level ) { $ map = Logger :: getLogLevelMap ( ) ; $ level = ( string ) $ level ; if ( isset ( $ map [ $ level ] ) || isset ( array_flip ( $ map ) [ strtoupper ( $ level ) ] ) ) { return true ; } throw new InvalidArgumentException ( "Severity level '$level' is not defined." ) ; }
Validates whether or not the provided log level exists.

@param string|int $level The severity of the log entry.
@return bool
@throws InvalidArgumentException
Validates whether or not the provided log level exists .