From a7d34c5befa20b9a6baddef04d3dbb3411e121e5 Mon Sep 17 00:00:00 2001
From: Jason Etheridge <jason@esilibrary.com>
Date: Mon, 23 May 2011 14:03:33 -0400
Subject: [PATCH] debugging aid, take the "thread trace" for a given page and
 make it stand out more

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
---
 .../xul/staff_client/server/skin/custom.js.example | 23 ++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/Open-ILS/xul/staff_client/server/skin/custom.js.example b/Open-ILS/xul/staff_client/server/skin/custom.js.example
index 2b00bb266c..d7b36b6aab 100644
--- a/Open-ILS/xul/staff_client/server/skin/custom.js.example
+++ b/Open-ILS/xul/staff_client/server/skin/custom.js.example
@@ -10,6 +10,7 @@
 
 // Debugging aids.  _dump_level = 4 enables all dump statements
 _dump_level = 4;
+
 var _dump_prefix = '0';
 try {
     netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
@@ -20,10 +21,28 @@ try {
         var temp = prefs.getIntPref('oils.unique_id') + 1;
         prefs.setIntPref('oils.unique_id',temp);
         _dump_prefix = String( temp );
+        switch( temp % 5 ) {
+            case 0: _dump_prefix = '!! ' + _dump_prefix; break;
+            case 1: _dump_prefix = '@@ ' + _dump_prefix; break;
+            case 2: _dump_prefix = '## ' + _dump_prefix; break;
+            case 3: _dump_prefix = '$$ ' + _dump_prefix; break;
+            case 4: default: _dump_prefix = '%% ' + _dump_prefix; break;
+        }
     }
-    dump(' _dump_prefix ' + _dump_prefix + ' = ' + location.href + '\n');
+    dump(' >>>>>>>>>>>>>>>>>>>>>>>>>>>> ' + _dump_prefix + ' = ' + location.href + '\n');
 } catch(E) {
     dump('Error in custom.js trying to set oils.unique_id\n');
 }
 
-
+function dump_xulG(msg) {
+    dump('[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\n');
+    dump(msg +'\n');
+    if (xulG) {
+        for (var i in xulG) {
+            dump('xulG['+i+'] = '+xulG[i]+'\n');
+        }
+    } else {
+        dump('no xulG\n');
+    }
+    dump(']]]]]]]]]]]]]]]]]]]]]]]]]]]]]\n');
+}
-- 
2.11.0