public function withLevel($level)
    {
        if (!isset(self::$levels[$level])) {
            throw new InvalidArgumentException('Unsupported log level "' . $level . '"');
        }

        $this->level = $level;
    }
public function withLevel($level)
    {
        if (!isset(self::$levels[$level])) {
            throw new InvalidArgumentException('Unsupported log level "' . $level . '"');
        }

        $this->level = $level;
    }
public function withLevel ( $ level ) { if ( ! isset ( self :: $ levels [ $ level ] ) ) { throw new InvalidArgumentException ( 'Unsupported log level "' . $ level . '"' ) ; } $ this -> level = $ level ; }
Set log level for logger

@param $level
@throws InvalidArgumentException
Set log level for logger