protected function normalizeLevel($level)
    {
        if (is_int($level) && array_search($level, self::$levels) !== false) {
            return $level;
        }

        if (is_string($level) && isset(self::$levels[$level])) {
            return self::$levels[$level];
        }

        throw new Exception(
            sprintf("Unknown LogLevel: '%s'", $level)
        );
    }
protected function normalizeLevel($level)
    {
        if (is_int($level) && array_search($level, self::$levels) !== false) {
            return $level;
        }

        if (is_string($level) && isset(self::$levels[$level])) {
            return self::$levels[$level];
        }

        throw new Exception(
            sprintf("Unknown LogLevel: '%s'", $level)
        );
    }
protected function normalizeLevel ( $ level ) { if ( is_int ( $ level ) && array_search ( $ level , self :: $ levels ) !== false ) { return $ level ; } if ( is_string ( $ level ) && isset ( self :: $ levels [ $ level ] ) ) { return self :: $ levels [ $ level ] ; } throw new Exception ( sprintf ( "Unknown LogLevel: '%s'" , $ level ) ) ; }
Converts a given log level to the integer form.

@param  mixed $level   The logging level
@return integer $level The normalized level
@throws Exception If $level is invalid
Converts a given log level to the integer form .