aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-04-21 15:59:49 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-06-05 14:45:52 +0200
commit197e98076352809946aabc2c8f042374f2af549e (patch)
tree8d68cc50858fef2ddf19dc50e64c3fbe99f583ca /data/lib
parent0b6ea333d13e6ae1cc4fa53e22c67246e0f95f32 (diff)
downloadbugzilla-triage-197e98076352809946aabc2c8f042374f2af549e.tar.gz
Add better logging support.
https://bugzilla.mozilla.org/show_bug.cgi?id=582760 is still unfixed.
Diffstat (limited to 'data/lib')
-rw-r--r--data/lib/rhbzpage.js9
-rw-r--r--data/lib/util.js6
2 files changed, 13 insertions, 2 deletions
diff --git a/data/lib/rhbzpage.js b/data/lib/rhbzpage.js
index 4adb6ea..d8f5727 100644
--- a/data/lib/rhbzpage.js
+++ b/data/lib/rhbzpage.js
@@ -1,6 +1,9 @@
// Released under the MIT/X11 license
// http://www.opensource.org/licenses/mit-license.php
+// Are we debugging?
+var debugFlag = true;
+
// For identification of graphics card
var manuChipStrs = [ [ "ATI Radeon", "ATI", "1002" ],
[ "ATI Mobility Radeon", "ATI", "1002" ],
@@ -131,6 +134,7 @@ 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
@@ -151,7 +155,7 @@ function RHcentralCommandDispatch(cmdLabel, cmdParams) {
function markBadAttachments(atts) {
var badMIMEArray = [ "application/octet-stream", "text/x-log", "undefined" ];
if (!constantData.passwordState.passAvailable) {
- console.log("markBadAttachments : No password, no XML-RPC calls; sorry");
+ console.myDebug("markBadAttachments : No password, no XML-RPC calls; sorry");
return null;
}
@@ -244,6 +248,7 @@ function fillInWhiteBoard(PCIidArrObj) {
}
}
+ console.myDebug("fillInWhiteBoard: cardName = " + cardName);
clickMouse("editme_action");
var titleElem = document.getElementById('short_desc');
titleElem.value = '[' + cardName + ']\u00A0' + titleElem.value;
@@ -381,7 +386,7 @@ function addClosingUpstream() {
centralCommandDispatch("resolution", "UPSTREAM");
}
else {
- console.log("No external bug specified among the External References!");
+ console.myDebug("No external bug specified among the External References!");
}
}
diff --git a/data/lib/util.js b/data/lib/util.js
index 40a782f..fa111aa 100644
--- a/data/lib/util.js
+++ b/data/lib/util.js
@@ -355,3 +355,9 @@ var NotLoggedinException = function NotLoggedinException (message) {
NotLoggedinException.prototype.toString = function () {
return this.name + ': "' + this.message + '"';
};
+
+console.myDebug = function myDebug(str) {
+ if (debugFlag) {
+ console.log(str);
+ }
+};