Remove extensions.zotero.debug.time and always show interval in output
This commit is contained in:
parent
f3fd7e7a10
commit
f55c2f51ee
2 changed files with 13 additions and 17 deletions
|
@ -25,7 +25,7 @@
|
|||
|
||||
|
||||
Zotero.Debug = new function () {
|
||||
var _console, _consolePref, _stackTrace, _store, _level, _time, _lastTime, _output = [];
|
||||
var _console, _consolePref, _stackTrace, _store, _level, _lastTime, _output = [];
|
||||
|
||||
this.init = function (forceDebugLog) {
|
||||
_consolePref = Zotero.Prefs.get('debug.log');
|
||||
|
@ -35,7 +35,6 @@ Zotero.Debug = new function () {
|
|||
Zotero.Prefs.set('debug.store', false);
|
||||
}
|
||||
_level = Zotero.Prefs.get('debug.level');
|
||||
_time = forceDebugLog || Zotero.Prefs.get('debug.time');
|
||||
_stackTrace = Zotero.Prefs.get('debug.stackTrace');
|
||||
|
||||
this.storing = _store;
|
||||
|
@ -61,20 +60,18 @@ Zotero.Debug = new function () {
|
|||
}
|
||||
|
||||
var deltaStr = '';
|
||||
if (_time || _store) {
|
||||
var delta = 0;
|
||||
var d = new Date();
|
||||
if (_lastTime) {
|
||||
delta = d - _lastTime;
|
||||
}
|
||||
_lastTime = d;
|
||||
|
||||
while (("" + delta).length < 7) {
|
||||
delta = '0' + delta;
|
||||
}
|
||||
|
||||
deltaStr = '(+' + delta + ')';
|
||||
var delta = 0;
|
||||
var d = new Date();
|
||||
if (_lastTime) {
|
||||
delta = d - _lastTime;
|
||||
}
|
||||
_lastTime = d;
|
||||
|
||||
while (("" + delta).length < 7) {
|
||||
delta = '0' + delta;
|
||||
}
|
||||
|
||||
deltaStr = '(+' + delta + ')';
|
||||
|
||||
if (stack === true) {
|
||||
// Display stack starting from where this was called
|
||||
|
@ -97,7 +94,7 @@ Zotero.Debug = new function () {
|
|||
}
|
||||
|
||||
if (_console) {
|
||||
var output = 'zotero(' + level + ')' + (_time ? deltaStr : '') + ': ' + message;
|
||||
var output = 'zotero(' + level + ')' + deltaStr + ': ' + message;
|
||||
if(Zotero.isFx && !Zotero.isBookmarklet) {
|
||||
// On Windows, where the text console (-console) is inexplicably glacial,
|
||||
// log to the Browser Console instead if only the -ZoteroDebug flag is used.
|
||||
|
|
|
@ -18,7 +18,6 @@ pref("extensions.zotero.debug.store.limit",500000);
|
|||
pref("extensions.zotero.debug.store.submitSize",10000000);
|
||||
pref("extensions.zotero.debug.store.submitLineLength",10000);
|
||||
pref("extensions.zotero.debug.level",5);
|
||||
pref("extensions.zotero.debug.time", false);
|
||||
pref("extensions.zotero.automaticScraperUpdates",true);
|
||||
pref("extensions.zotero.zoteroDotOrgVersionHeader", true);
|
||||
pref("extensions.zotero.triggerProxyAuthentication", true);
|
||||
|
|
Loading…
Reference in a new issue