public function log(LoggedQuery $query)
{
if ($this->_logger) {
if ($this->_logger instanceof PsrAbstractLogger) {
$this->_logger->log($query, $query->error);
} else {
$this->_logger->log($query);
}
}
if (!empty($query->params)) {
$query->query = $this->_interpolate($query);
}
$this->_totalTime += $query->took;
$this->_totalRows += $query->numRows;
$this->_queries[] = ['query' => $query->query, 'took' => $query->took, 'rows' => $query->numRows];
}