public function setLevel(string $level)
    {
        if (!defined(LogLevel::class . '::' . strtoupper($level)))
            throw new \DomainException("Invalid log level: $level");

        $this->level = $level;
        $this->level_num = self::$LEVEL_NUMERIC[$level];
        return $this;
    }
public function setLevel(string $level)
    {
        if (!defined(LogLevel::class . '::' . strtoupper($level)))
            throw new \DomainException("Invalid log level: $level");

        $this->level = $level;
        $this->level_num = self::$LEVEL_NUMERIC[$level];
        return $this;
    }
public function setLevel ( string $ level ) { if ( ! defined ( LogLevel :: class . '::' . strtoupper ( $ level ) ) ) throw new \ DomainException ( "Invalid log level: $level" ) ; $ this -> level = $ level ; $ this -> level_num = self :: $ LEVEL_NUMERIC [ $ level ] ; return $ this ; }
Set the log level for this module. Any log messages with a severity lower
than this threshold will not bubble up.
@param string $level The minimum log level of messages to handle
Set the log level for this module . Any log messages with a severity lower than this threshold will not bubble up .