private function prepareLogLevels(string $level)
    {
        $levels = [
            LogLevel::EMERGENCY,
            LogLevel::ALERT,
            LogLevel::CRITICAL,
            LogLevel::ERROR,
            LogLevel::WARNING,
            LogLevel::NOTICE,
            LogLevel::INFO,
            LogLevel::DEBUG,
        ];

        $key = array_search($level, $levels);

        if (null !== $key) {
            $this->levels = array_slice($levels, 0, $key + 1);
        }
    }
private function prepareLogLevels(string $level)
    {
        $levels = [
            LogLevel::EMERGENCY,
            LogLevel::ALERT,
            LogLevel::CRITICAL,
            LogLevel::ERROR,
            LogLevel::WARNING,
            LogLevel::NOTICE,
            LogLevel::INFO,
            LogLevel::DEBUG,
        ];

        $key = array_search($level, $levels);

        if (null !== $key) {
            $this->levels = array_slice($levels, 0, $key + 1);
        }
    }
private function prepareLogLevels ( string $ level ) { $ levels = [ LogLevel :: EMERGENCY , LogLevel :: ALERT , LogLevel :: CRITICAL , LogLevel :: ERROR , LogLevel :: WARNING , LogLevel :: NOTICE , LogLevel :: INFO , LogLevel :: DEBUG , ] ; $ key = array_search ( $ level , $ levels ) ; if ( null !== $ key ) { $ this -> levels = array_slice ( $ levels , 0 , $ key + 1 ) ; } }
Prepare log levels for logfile

@param string $level
Prepare log levels for logfile