Converts PSR-3 levels to Monolog ones if necessary

@param string|int Level number (monolog) or name (PSR-3)
@return int
426663
public static function toMonologLevel($level)
    {
        if (is_string($level) && defined(__CLASS__.'::'.strtoupper($level))) {
            return constant(__CLASS__.'::'.strtoupper($level));
        }

        return $level;
    }
573874
public function getLevelCode($levelName)
    {
        $levelName = strtoupper($levelName);

        $levels = $this->getLevels();

        if (isset($levels[$levelName])) {
            return $levels[$levelName];
        }

        return $levels[$this->defaultLevelName];
    }
364002
private function getSyslogPriority(\n2n\log4php\LoggerLevel $level) {
		if($this->overridePriority) {
			return $this->intPriority;
		}
		return $level->getSyslogEquivalent();
	}
602047
public static function getLevelName($level)
    {
        $level = (int) $level;
        foreach (static::$levelNameToLevel as $levelName => $currentLevel) {
            if ($level >= $currentLevel) {
                return $levelName;
            }
        }

        return static::$levelNameToLevel[static::ALL];
    }
305798
public static function getLevelByName($level)
    {
        $level = strtoupper($level);
        if (!isset(static::$levelNameToLevel[$level])) {
            return static::ALL;
        }

        return static::$levelNameToLevel[$level];
    }
198696
protected function convertVerbosityLevel(int $verbosity): int
    {
        switch ($verbosity) {
            case static::VERBOSITY_QUIET:
                $result = OutputInterface::VERBOSITY_QUIET;
                break;
            case static::VERBOSITY_NORMAL:
                $result = OutputInterface::VERBOSITY_NORMAL;
                break;
            case static::VERBOSITY_VERBOSE:
                $result = OutputInterface::VERBOSITY_VERBOSE;
                break;
            case static::VERBOSITY_VERY_VERBOSE:
                $result = OutputInterface::VERBOSITY_VERY_VERBOSE;
                break;
            default:
                $result = OutputInterface::VERBOSITY_NORMAL;
                break;
        }

        return $result;
    }
1325645
protected function parseVerbosity($level = null)
    {
        if (isset($this->verbosityMap[$level])) {
            $level = $this->verbosityMap[$level];
        } elseif (! is_int($level)) {
            $level = $this->verbosity;
        }

        return $level;
    }
1026314
public static function getVerbosityForLevel($level) {
        if ($level === 0) {
            return self::NORMAL;
        }

        if ($level === 1) {
            return self::VERBOSE;
        }

        if ($level === 3) {
            return self::SILENT;
        }

        return self::DEBUG;
    }
455290
private function getInlineLevel(array $record)
    {
        if ($this->isTranslationLog($record)) {
            return 0;
        }

        if ($this->isDoctrineLog($record) || $this->isAsseticLog($record)) {
            return 1;
        }

        return 2;
    }
129576
public static int toInteger(LogLevel level) {
		if (level == LogLevel.Fatal)
			return 1;
		if (level == LogLevel.Error)
			return 2;
		if (level == LogLevel.Warn)
			return 3;
		if (level == LogLevel.Info)
			return 4;
		if (level == LogLevel.Debug)
			return 5;
		if (level == LogLevel.Trace)
			return 6;
		return 0;
	}
1216438
private int getLevel(final Level recordLevel) {
    if (recordLevel.equals(Level.OFF)) {
      return 0;
    } else if (recordLevel.equals(Level.SEVERE)) {
      return 1;
    } else if (recordLevel.equals(Level.WARNING)) {
      return 2;
    } else if (recordLevel.equals(Level.ALL)) {
      return 4;
    } else {
      return 3;
    }
  }
569486
private function getLevel(\Throwable $t, array $context): string
    {
        // Check if the severity matches a PSR-3 log level
        if (
            false === $this->ignoreSeverity &&
            isset($context[Context::SEVERITY]) &&
            is_string($context[Context::SEVERITY]) &&
            $this->validateLevel($context[Context::SEVERITY])
        ) {
            return $context[Context::SEVERITY];
        }

        // Find the log level based on the error in the level map (avoid looping through the whole array)
        // Note: this ignores the order defined in the map.
        $class = get_class($t);
        if (isset($this->levelMap[$class]) && $this->validateLevel($this->levelMap[$class])) {
            return $this->levelMap[$class];
        }

        // Find the log level based on the error in the level map
        foreach ($this->levelMap as $className => $candidate) {
            if ($t instanceof $className && $this->validateLevel($candidate)) {
                return $candidate;
            }
        }

        // Return the default log level
        return self::DEFAULT_LOG_LEVEL;
    }
338444
public static function getLevelName($level) {
        $level = (int) $level;
        if (!isset(self::$_levels[$level])) {
            throw new CM_Exception_Invalid('Level is not defined', null, [
                'level'           => $level,
                'availableLevels' => implode(', ', array_keys(self::$_levels)),
            ]);
        }
        return self::$_levels[$level];
    }
521504
public function getLogLevelName($level):string
    {
        return isset(self::$levels[$level])?self::$levels[$level]:'';
    }
1091509
protected function getLevelName($level)
    {
        return in_array($level, self::$levels) ? array_search($level, self::$levels) : '--';
    }
744051
protected function getLevel()
  {
    if($this->currObj instanceof TeamSpeak3_Node_Channel)
    {
      return $this->currObj->getLevel()+2;
    }
    elseif($this->currObj instanceof TeamSpeak3_Node_Client)
    {
      return $this->currObj->channelGetById($this->currObj->cid)->getLevel()+3;
    }

    return 1;
  }
538093
static public String fromLevel(int level, int length) {
        StringBuffer sb = new StringBuffer(length > 7 ? length : 7);
        switch (level) {
        case LogService.LOG_INFO:
            sb.append("info");
            break;
        case LogService.LOG_DEBUG:
            sb.append("debug");
            break;
        case LogService.LOG_WARNING:
            sb.append("Warning");
            break;
        case LogService.LOG_ERROR:
            sb.append("ERROR");
            break;
        case 0:
            sb.append("DEFAULT");
            break;
        default:
            sb.append("[");
            sb.append(level);
            sb.append("]");
        }
        for (int i = sb.length(); i < length; i++) {
            sb.append(" ");
        }
        return sb.toString();
    }