public function getLevelCode(string $level): int
    {
        if ($this->levelIsValid($level) === false) {
            throw new \InvalidArgumentException('Invalid log-level provided.');
        }
        return array_search($level, $this->levels);
    }
public function getLevelCode(string $level): int
    {
        if ($this->levelIsValid($level) === false) {
            throw new \InvalidArgumentException('Invalid log-level provided.');
        }
        return array_search($level, $this->levels);
    }
public function getLevelCode ( string $ level ) : int { if ( $ this -> levelIsValid ( $ level ) === false ) { throw new \ InvalidArgumentException ( 'Invalid log-level provided.' ) ; } return array_search ( $ level , $ this -> levels ) ; }
Returns numeric level code for given log-level.

@param string $level
@return int
Returns numeric level code for given log - level .