browser/components/customizableui/src/logging.js

Wed, 31 Dec 2014 06:55:46 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:46 +0100
changeset 1
ca08bd8f51b2
permissions
-rw-r--r--

Added tag TORBROWSER_REPLICA for changeset 6474c204b198

michael@0 1 #if 0
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5 #endif
michael@0 6
michael@0 7 XPCOMUtils.defineLazyModuleGetter(this, "console",
michael@0 8 "resource://gre/modules/devtools/Console.jsm");
michael@0 9
michael@0 10 let gDebug = false;
michael@0 11 try {
michael@0 12 gDebug = Services.prefs.getBoolPref(kPrefCustomizationDebug);
michael@0 13 } catch (e) {}
michael@0 14
michael@0 15 function LOG(...args) {
michael@0 16 if (gDebug) {
michael@0 17 args.unshift(gModuleName);
michael@0 18 console.log.apply(console, args);
michael@0 19 }
michael@0 20 }
michael@0 21
michael@0 22 function ERROR(...args) {
michael@0 23 args.unshift(gModuleName);
michael@0 24 console.error.apply(console, args);
michael@0 25 }
michael@0 26
michael@0 27 function INFO(...args) {
michael@0 28 args.unshift(gModuleName);
michael@0 29 console.info.apply(console, args);
michael@0 30 }
michael@0 31

mercurial