src/Db/Command.php
protected function logQuery($category)
    {
        if ($this->db->enableLogging) {
            $rawSql = $this->getRawSql();
            $message = sprintf("SQL: \"%s\"\nCategory: %s", $rawSql, $category);
            \Reaction::info($message);
        }
        if (!$this->db->enableProfiling) {
            return [false, isset($rawSql) ? $rawSql : null];
        }

        return [true, isset($rawSql) ? $rawSql : $this->getRawSql()];
    }
protected function logQuery($category)
    {
        if ($this->db->enableLogging) {
            $rawSql = $this->getRawSql();
            $message = sprintf("SQL: \"%s\"\nCategory: %s", $rawSql, $category);
            \Reaction::info($message);
        }
        if (!$this->db->enableProfiling) {
            return [false, isset($rawSql) ? $rawSql : null];
        }

        return [true, isset($rawSql) ? $rawSql : $this->getRawSql()];
    }
Logs the current database query if query logging is enabled and returns
the profiling token if profiling is enabled.
@param string $category the log category.
@return array array of two elements, the first is boolean of whether profiling is enabled or not.
The second is the rawSql if it has been created.