Wed, 31 Dec 2014 07:53:36 +0100
Correct small whitespace inconsistency, lost while renaming variables.
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 |