Add debugParams option to DB.query() to disable parameter logging

Allow logging of queries without including very large parameter values
This commit is contained in:
Dan Stillman 2019-04-23 20:04:13 -04:00
parent a85d707226
commit 725e6e779e

View file

@ -759,7 +759,7 @@ Zotero.DBConnection.prototype.columnQueryAsync = Zotero.Promise.coroutine(functi
Zotero.DBConnection.prototype.logQuery = function (sql, params = [], options) {
if (options && options.debug === false) return;
var msg = sql;
if (params.length) {
if (params.length && (!options || options.debugParams !== false)) {
msg += " [";
for (let i = 0; i < params.length; i++) {
let param = params[i];