mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1240330 - mozAlarm debug messages are turned on r=khuey
This commit is contained in:
parent
558666e0f3
commit
c1a40a7808
@ -4,18 +4,27 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
/* static functions */
|
||||
const DEBUG = true;
|
||||
|
||||
function debug(aStr) {
|
||||
DEBUG && dump("AlarmService: " + aStr + "\n");
|
||||
}
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/AlarmDB.jsm");
|
||||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
Cu.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
||||
function getLogger() {
|
||||
var logger = Log.repository.getLogger("AlarmsService");
|
||||
logger.addAppender(new Log.DumpAppender(new Log.BasicFormatter()));
|
||||
logger.level = Log.Level.Debug;
|
||||
return logger;
|
||||
}
|
||||
|
||||
const logger = getLogger();
|
||||
|
||||
/* Only log in B2G */
|
||||
function debug(aStr) {
|
||||
AppConstants.MOZ_B2G && logger.debug(aStr);
|
||||
}
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["AlarmService"];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user