Returns true only if $level comes before $compareLevel
@param string $level
@param string $compareLevel
483070
function levelIsBefore($level, $compareLevel)
    {
        $level_incdeces = $this->getLevelIndeces();
        $level_index = $level_incdeces[$level];
        $level_index_compare = $level_incdeces[$compareLevel];
        return $level_index < $level_index_compare;
    }
38242
public function checkMessageLogLevel(string $message_level) : bool
    {
        foreach($this->log_levels as $lvl)
        {
            if ($lvl === 'ALL'){
                return true;
            }
            if (self::compareLogLevel($message_level, $lvl) === 0){
                return true;
            }
        }
        return false;
    }
606653
public function Level($level)
    {
        $parent = $this;
        $stack = array($parent);
        while ($parent = $parent->Parent) {
            array_unshift($stack, $parent);
        }

        return isset($stack[$level-1]) ? $stack[$level-1] : null;
    }
672738
public function setCompressionLevel($level) {
		$level = (int) $level;
		
		if ($level < 1) {
			$level = 1;
		} else if ($level > 9) {
			$level = 9;
		}
		
		$this->compressionLevel = $level;
	}
568005
public static function getLevelSeverity($level)
    {
        if (($index = array_search($level, self::getValues(), true)) === false) {
            throw new \InvalidArgumentException(sprintf('Unknown level "%s"', $level));
        }

        return $index;
    }
560071
public function isLessOrEqualTo(Decimal $b, int $scale = null): bool
    {
        $comparisonResult = $this->comp($b, $scale);

        return $comparisonResult === -1 || $comparisonResult === 0;
    }
865933
public function header($header, $level = self::HIGH)
    {
        $header = strtolower($header);

        if (empty($this->headers[$header])) {
            return false;
        }

        return self::qFactor($this->headers[$header], $level);
    }
394088
public function scopeAt($levels, $replace = false)
    {
        $prev = $this->scopedErrors;
        $this->scopedErrors = (int) $levels;
        if (!$replace) {
            $this->scopedErrors |= $prev;
        }

        return $prev;
    }
484364
public function setNotifyLevel($notifyLevel)
    {
        if (!in_array($notifyLevel, $this->getLogLevelOrder())) {
            syslog(LOG_WARNING, 'Bugsnag Warning: Invalid notify level supplied to Bugsnag Logger');
        } else {
            $this->notifyLevel = $notifyLevel;
        }
    }
455306
public function level($level = null)
    {
        if ($level !== null) {
            $this->_level = $level;
        }

        return $this->_level;
    }
1021581
public static function isTemporaryDisabled(?string $whichLevel = null): bool
    {
        if ($whichLevel === null) {
            return static::$temporaryDisabled !== false;
        } else {
            if (is_array(static::$temporaryDisabled)) {
                return in_array($whichLevel, static::$temporaryDisabled);
            } else {
                return false;
            }
        }
    }
1255022
public static function compare($compare1, $operator, $compare2, $strict = false)
    {
        $operator = trim(strtolower($operator));

        switch ($operator) {
            case '=':
            case '==':
            case 'eq':
                return $strict ? $compare1 === $compare2 : $compare1 == $compare2;
                break;

            case '===':
                return $compare1 === $compare2;
                break;

            case '!=':
            case 'neq':
                return $strict ? $compare1 !== $compare2 : $compare1 != $compare2;
                break;

            case '!==':
                return $compare1 !== $compare2;
                break;

            case '>':
            case 'gt':
                return $compare1 > $compare2;
                break;

            case '>=':
            case 'gte':
                return $compare1 >= $compare2;
                break;

            case '<':
            case 'lt':
                return $compare1 < $compare2;
                break;

            case '<=':
            case 'lte':
                return $compare1 <= $compare2;
                break;

            case 'in':
                return in_array($compare1, static::toArray($compare2), $strict);
                break;

            case 'not in':
            case 'not-in':
            case 'notin':
            case 'nin':
                return !in_array($compare1, static::toArray($compare2), $strict);
                break;

            default:
                throw new \InvalidArgumentException('Invalid compare operator: ' . $operator);
        }
    }
946116
public function equals($compare): bool
    {
        if ($compare instanceof self) {
            return ($this->name() === $compare->name());
        }

        return false;
    }
420780
public function hasAccess($accessLevel)
    {
        foreach ($this->permissions as $permission) {
            /**
             * If the user has the \Globa\* access level he can
             * do everything
             */
            if ($permission == '\\Global\\*') {
                return true;
            }
            
            if ($permission == $accessLevel) {
                return true;
            }
            
            // If there is a star in the permission and everything before 
            // the star is equal with the access level, the user has access
            // to the given access level.
            $posStar = strpos($permission, '*');
            if ($posStar !== false) {
                $startPermission = substr($permission, 0, $posStar);
                $startAccessLevel = substr($accessLevel, 0, $posStar);
                
                if ($startPermission == $startAccessLevel) {
                    return true;
                }
            } 
        }
    
        return false;
    }
717454
public function setLevel(\n2n\log4php\LoggerLevel $level = null) {
		if (isset($level)) {
			parent::setLevel($level);
		} else {
			throw new \n2n\log4php\LoggerException("log4php: Cannot set LoggerRoot level to null.", E_USER_WARNING);
		}
	}
531208
function getNextLevels($deltaLevel)
    {
        $prevLevels = $this->getPrevLevels($deltaLevel);
        $return = $this->getLevels();
        foreach ($return as $key => $level) {
            if (in_array($level, $prevLevels) || $level == $deltaLevel) {
                unset($return[$key]);
            }
        }
        return array_values($return);
    }
305798
public static function getLevelByName($level)
    {
        $level = strtoupper($level);
        if (!isset(static::$levelNameToLevel[$level])) {
            return static::ALL;
        }

        return static::$levelNameToLevel[$level];
    }