public function save(SqlQuery $query)
    {
        $this->createDirectoryIfNotExists($query->number());

        $line = $this->formatter->getLine($query);

        if ($this->shouldLogQuery($query)) {
            $this->saveLine($line, $this->fileName->getForAllQueries(), $this->shouldOverrideFile($query));
        }

        if ($this->shouldLogSlowQuery($query)) {
            $this->saveLine($line, $this->fileName->getForSlowQueries());
        }
    }