diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-05-05 12:27:10 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-05-05 12:27:10 +0200 |
commit | 4b99c3d6a0efca79d94fc29398f0eab1fd75d492 (patch) | |
tree | 610d660aaac3f687ecc7cc8238d4d2a11f60c4a7 /data | |
parent | 2a8cfd4c1b55125d3211694496cea35cc9603ff9 (diff) | |
download | bugzilla-triage-4b99c3d6a0efca79d94fc29398f0eab1fd75d492.tar.gz |
Make my console.myDebug configurable via about:config preference.
That is the Boolean variable bugzilla-triage.setting.debug
Diffstat (limited to 'data')
-rw-r--r-- | data/lib/bzpage.js | 4 | ||||
-rw-r--r-- | data/lib/util.js | 9 | ||||
-rw-r--r-- | data/rhlib/rhbzpage.js | 3 |
3 files changed, 7 insertions, 9 deletions
diff --git a/data/lib/bzpage.js b/data/lib/bzpage.js index d957bd3..296fe29 100644 --- a/data/lib/bzpage.js +++ b/data/lib/bzpage.js @@ -22,7 +22,7 @@ var equivalentComponents = null; * central handler processing messages from the main script. */ self.on('message', function onMessage(msg) { - console.log("onMessage - incoming : msg.cmd = " + msg.cmd); + console.myDebug("onMessage - incoming : msg.cmd = " + msg.cmd); switch (msg.cmd) { case "ReloadThePage": document.location.reload(true); @@ -80,7 +80,7 @@ function executeCommand(cmdObj) { * Object with the appropriate parameters for the command */ function centralCommandDispatch (cmdLabel, cmdParams) { - console.log("centralCommandDispatch : cmdLabel = " + cmdLabel); + console.myDebug("centralCommandDispatch : cmdLabel = " + cmdLabel); switch (cmdLabel) { case "name": case "position": diff --git a/data/lib/util.js b/data/lib/util.js index 6ed131e..11cf3bc 100644 --- a/data/lib/util.js +++ b/data/lib/util.js @@ -375,11 +375,10 @@ NotLoggedinException.prototype.toString = function () { return this.name + ': "' + this.message + '"'; }; -// Are we debugging? -var debugFlag = false; - console.myDebug = function myDebug(str) { - if (debugFlag) { - console.log(str); + if (typeof config !== "undefined") { + if (config.debuggingVerbose) { + console.log(str); + } } }; diff --git a/data/rhlib/rhbzpage.js b/data/rhlib/rhbzpage.js index 14fe19d..134ea79 100644 --- a/data/rhlib/rhbzpage.js +++ b/data/rhlib/rhbzpage.js @@ -131,7 +131,6 @@ function RHcentralCommandDispatch(cmdLabel, cmdParams) { markBugTriaged(); break; case "chipMagic": - console.myDebug("cmdParams = " + cmdParams.toSource()); fillInWhiteBoard(cmdParams); break; // If we don't have it here, call superclass method @@ -252,7 +251,6 @@ function fillInChipMagic(XlogID) { function chipsetMagic (interestingLineArr) { // parse Xorg.0.log var cardStr = ""; - console.myDebug("interestingLineArr = " + interestingLineArr.toSource()); console.myDebug("interestingLineArr[1] = " + interestingLineArr[1]); if (interestingLineArr.length >0) { @@ -497,6 +495,7 @@ function RHBZinit() { // Xorg.0.log must be text, otherwise we cannot parse it return (/[xX].*log/.test(value[0]) && /text/.test(value[2])); }); + // Just add a link to every Xorg.0.log link analyzing it. addCheckXorgLogLink(XorgLogAttList); |