Cap length of debug outputs

This commit is contained in:
Erik 2023-10-11 14:39:52 +03:00
parent 4240e978cf
commit 8230fa376b

View File

@ -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<T>(query, values ?? [], opts);