Indent and return the new level.

@param null $level

@return int
166144
public function indent($level = null)
    {
        $level = $level ?: $this->getLevel();
        array_push($this->indentStack, $level);

        return $level;
    }
361451
protected function normalizeLevel($level)
    {
        if (isset($this->logLevelMap[$level])) {
            return $this->logLevelMap[$level];
        }
        return strtolower($level);
    }
301609
private function convertLevel($level)
    {
        # If this is one of the defined string log levels then return it's numeric value
        if (!array_key_exists($level, $this->levels)) {
            throw new InvalidArgumentException("Unknown log level: {$level}");
        }

        return $this->levels[$level];
    }
338933
private function addIndentation(string $line, int $indentLevel): string
  {
    return ($line==='') ? '' : str_repeat(' ', $this->indentation * $indentLevel).$line;
  }
1088339
public function setIndent($indent)
    {
        if ($this->step !== null) {
            throw new \RuntimeException('Cannot change indent during encoding');
        }

        $this->indent = is_int($indent) ? str_repeat(' ', $indent) : (string) $indent;
        return $this;
    }
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];
    }
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;
    }
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;
    }
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;
    }
42572
public function toString($indent = null)
    {
        $output = parent::toString($indent);
        $output = str_replace(
            ['<title>', '</title>'], ['<h1>', '</h1>'], $output
        );

        return $output;
    }
1290274
public function setLevel($level)
    {
        if ($level < 0 || $level > 100) {
            throw new \InvalidArgumentException(sprintf(
                    'Invalid Postrize Level "%s"', (string) $level
            ));
        }
        $this->level = (int) $level;

        return $this;
    }
426663
public static function toMonologLevel($level)
    {
        if (is_string($level) && defined(__CLASS__.'::'.strtoupper($level))) {
            return constant(__CLASS__.'::'.strtoupper($level));
        }

        return $level;
    }
765927
public function andLevelEquals($level, $alias = null)
    {
        list($alias, $suffix) = $this->getAliasAndSuffix($alias);

        return $this->andWhere($alias.'._level = :level'.$suffix)
                        ->setParameter('level'.$suffix, $level);
    }
953302
public static function toBitrixLevel($level)
    {
        $levels = static::logLevels();

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

        return false;
    }
886273
public function level($level)
    {
        if ($level === null) {
            return $this;
        }
        
        $this->prepend = '   ' . (str_repeat('  ', $level));
        
        return $this;
    }
211881
private static String getTabBasedOnLevel(int level, int indentSize) {
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < level; i ++) {
            for(int j = 0; j < indentSize; j++) {
                sb.append(" ");
            }
        }
        return sb.toString();
    }
206986
public function get($level = null)
    {
        if (isset($level)) {
            return $this->getMessage();
        }

        return $this->current->where('level', $level);
    }