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:
parent
a85d707226
commit
725e6e779e
1 changed files with 1 additions and 1 deletions
|
@ -759,7 +759,7 @@ Zotero.DBConnection.prototype.columnQueryAsync = Zotero.Promise.coroutine(functi
|
||||||
Zotero.DBConnection.prototype.logQuery = function (sql, params = [], options) {
|
Zotero.DBConnection.prototype.logQuery = function (sql, params = [], options) {
|
||||||
if (options && options.debug === false) return;
|
if (options && options.debug === false) return;
|
||||||
var msg = sql;
|
var msg = sql;
|
||||||
if (params.length) {
|
if (params.length && (!options || options.debugParams !== false)) {
|
||||||
msg += " [";
|
msg += " [";
|
||||||
for (let i = 0; i < params.length; i++) {
|
for (let i = 0; i < params.length; i++) {
|
||||||
let param = params[i];
|
let param = params[i];
|
||||||
|
|
Loading…
Reference in a new issue