From 8230fa376b73010a924bfb817a7f2c808ab5601e Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 11 Oct 2023 14:39:52 +0300 Subject: [PATCH] Cap length of debug outputs --- src/MariaDB.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MariaDB.ts b/src/MariaDB.ts index c4a275f..b8b6e27 100644 --- a/src/MariaDB.ts +++ b/src/MariaDB.ts @@ -391,7 +391,7 @@ class MariaDB resolve(fields); connection.release(); }); - this.#logger.debug(`Constructed query: ${q.sql}`); + this.#logger.debug(`Constructed query: ${q.sql.substring(0, 1024)}`); }); return Promise.resolve(result || []); } @@ -421,7 +421,7 @@ class MariaDB let batch = false; if (values && typeof values.some === 'function') batch = values.some(val => val instanceof Array); - this.#logger.debug(`Incoming query (batch: ${batch})\n${query}\n${inspect(values)}`); + this.#logger.debug(`Incoming query (batch: ${batch})\n${query}\n${inspect(values).substring(0, 1024)}`); return this.#_query(query, values ?? [], opts);