protected function shouldLogSlowQuery(SqlQuery $query)
    {
        return $this->config->logSlowQueries() && $query->time() >= $this->config->slowLogTime() &&
            preg_match($this->config->slowQueriesPattern(), $query->raw());
    }