@param int $level

@throws \OutOfBoundsException
355
private function checkLevel(int $level)
    {
        if ($level <= 0 || $level > self::MAX_LEVEL_DEPTH) {
            throw new OutOfBounds(
                sprintf('Administrative level should be an integer in [1,%d], %d given', self::MAX_LEVEL_DEPTH, $level)
            );
        }
    }
179330
public function log($level, $message, array $context = array()) {
		try {
			if($this->messageType === null) {
				error_log($message);
			} elseif((int)$this->messageType === 0 || (int)$this->messageType === 4) {
				error_log($message, $this->messageType);
			} else {
				error_log($message, (int)$this->messageType, $this->destination, $this->extraHeaders);
			}
		} catch(\Exception $e) {
		}
	}
871388
public function setLogLevel($level = \Monolog\Logger::DEBUG)
    {
        $this->logLevel = (int) $level;
        return $this;
    }
86482
public function setLogLevel($level)
    {
        $this->logLevelSet = true;
        if ($level != $this->getLogLevel()) {
            $this->logLevel = $level;
            $this->info("Setting loglevel to $level");
        }
    }
363143
public function checkLevel($level)
    {
        if (static::$levels === null) {
            // Psr\Log does not provide Enum, so we need to load levels from LogLevel constants
            $reflection = new \ReflectionClass(LogLevel::class);
            static::$levels = $reflection->getConstants();
        }

        if (!in_array($level, static::$levels)) {
            $levels = implode(', ', static::$levels);
            throw new InvalidArgumentException("Level must be one of [$levels].");
        }
    }
1160835
public function setLevel($level)
    {
        if (($level < 0) || ($level > 9)) {
            throw new Exception\InvalidArgumentException('Level must be between 0 and 9');
        }

        $this->options['level'] = (int) $level;
        return $this;
    }
633752
public function setLogLevel($level = 0)
    {
        if (is_string($level)) {
            $level = defined('Horde_Log::' . $level)
                ? constant('Horde_Log::' . $level)
                : 0;
        }

        $this->_logLevel = $level;
    }
1214932
public function add($msg,$level=self::INFO){
		//dont log if we dont need to
		if($level > $this->level || $this->level === false)
			return false;
		//fail if not initialized
		if(!$this->sig || !$this->callback)
			throw new Exception('Logging not initiated please call Vidcache->initLog()');
		//format the message (gets further formatted by the callback
		$msg = '['.$this->label.'] ['.$this->sig.'] - '.$msg;
		//call to the logging function
		return call_user_func_array($this->callback,array($msg,$level));
	}
456858
public function log($message, $level = 0) {
        foreach ($this->_loggers as $logger) {
            try {
                $logger->logMessage($message, $level);
            } catch (LoggerException $e) {
                throw $e;
            }
        }
    }
802011
protected function handleHeader($level)
    {
        if ($this->parser->isStartTag) {
            $this->out(str_repeat('#', $level) . ' ', true);
        } else {
            $this->setLineBreaks(2);
        }
    }
922814
public function setEnabledLevels(array $levels)
    {
        $enabledLevels = array();

        foreach ($levels as $value) {
            if ($this->validLevel($value)) {
                array_push($enabledLevels, $value);
            }
        }

        $this->_enabledLevels = $enabledLevels;
    }
783710
public function sendMessage($level, $message)
    {
        if (is_resource($this->connect)) {
            fwrite($this->connect, '['.date('H:i:s d.m.Y').'] '.ucfirst($level).": {$message}\n");
        } else {
            throw new Exception('Error write log in file.');
        }
    }
1308607
private function scan($data,$level) {
		if (!isset($data[0])){
			$data = array($data);
		}
		foreach($data as $key => $record){
			 $this->extract($record,$level);	
		}
	}
789769
protected function savepointCreate(int $level)
    {
        $this->isProfiling() && $this->getLogger()->info("Transaction: new savepoint 'SVP{$level}'");
        $this->execute('SAVE TRANSACTION ' . $this->identifier("SVP{$level}"));
    }
268274
public function setLevel($level)
    {
        if (!is_int($level)) {
            $plop = \Plop\Plop::getInstance();
            $level = $plop->getLevelValue($level);
        }
        $this->level = $level;
        return $this;
    }
418471
public function setNextQueryIsolationLevel(string $level) : void
    {
        if (!\in_array($level, static::ISOLATION_LEVELS, true)) {
            throw new InvalidIsolationLevelException();
        }

        $this->nextQueryIsolationLevel = $level;
    }
728725
public static function hasLevel(int $level=null) :bool {
		// if we have said level
		return self::$_account ? 
			self::getAccount()->hasLevel($level) : false;
	}