diff --git a/src/libs/middlewares/query.js b/src/libs/middlewares/query.js
index 1ace09aac170521d573459e38bcf0347a24afc95..97df67e0666a6dde0749ee3cb3c7f1fc0134e81e 100644
--- a/src/libs/middlewares/query.js
+++ b/src/libs/middlewares/query.js
@@ -5,7 +5,7 @@ const execQuery = require(`${libs}/db/query_exec`);
  // Middleware that executes a query defined by a squel object in req.sql
 function query(req, res, next) {
     let sql = req.sql.toParam();
-    log.debug(sql);
+    log.debug(req.sql.toString());
     execQuery(sql.text, sql.values).then((result) => {
         req.result = result;
         if (result.length === 0) {