public function logQuery(string $sql, array $params = [])
    {
        if ($this->logger instanceof LoggerInterface) {
            $message = $sql . ' => ' . json_encode($params);
            $this->logger->info($message);
        }
    }
public function logQuery(string $sql, array $params = [])
    {
        if ($this->logger instanceof LoggerInterface) {
            $message = $sql . ' => ' . json_encode($params);
            $this->logger->info($message);
        }
    }
public function logQuery ( string $ sql , array $ params = [ ] ) { if ( $ this -> logger instanceof LoggerInterface ) { $ message = $ sql . ' => ' . json_encode ( $ params ) ; $ this -> logger -> info ( $ message ) ; } }
Log a query to the configured logger.

@param string $sql
@param array $params
Log a query to the configured logger .