src/Jackiedo/LogReader/Levelable.php
public function filter($level, $allowed)
    {
        if (empty($allowed)) {
            return true;
        }

        if (is_array($allowed)) {
            $merges = array_values(array_uintersect($this->levels, $allowed, "strcasecmp"));
            if (in_array(strtolower($level), $merges)) {
                return true;
            }
        }

        return false;
    }
public function filter($level, $allowed)
    {
        if (empty($allowed)) {
            return true;
        }

        if (is_array($allowed)) {
            $merges = array_values(array_uintersect($this->levels, $allowed, "strcasecmp"));
            if (in_array(strtolower($level), $merges)) {
                return true;
            }
        }

        return false;
    }
public function filter ( $ level , $ allowed ) { if ( empty ( $ allowed ) ) { return true ; } if ( is_array ( $ allowed ) ) { $ merges = array_values ( array_uintersect ( $ this -> levels , $ allowed , "strcasecmp" ) ) ; if ( in_array ( strtolower ( $ level ) , $ merges ) ) { return true ; } } return false ; }
Filter logs by level

@param  string $level   Level need to check
@param  array  $allowed Strict levels to filter

@return bool
Filter logs by level