mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 918408 - remove marionette.log file, enable stdout logging via pref for non-debug/non-b2g builds, r=jgriffin
This commit is contained in:
parent
df44475475
commit
feb028aa17
@ -12,6 +12,7 @@ class GeckoInstance(object):
|
||||
|
||||
required_prefs = {"marionette.defaultPrefs.enabled": True,
|
||||
"marionette.defaultPrefs.port": 2828,
|
||||
"marionette.logging": True,
|
||||
"startup.homepage_welcome_url": "about:blank",
|
||||
"browser.shell.checkDefaultBrowser": False,
|
||||
"browser.startup.page": 0,
|
||||
|
@ -11,6 +11,7 @@ const MARIONETTE_CONTRACTID = "@mozilla.org/marionette;1";
|
||||
const MARIONETTE_CID = Components.ID("{786a1369-dca5-4adc-8486-33d23c88010a}");
|
||||
const MARIONETTE_ENABLED_PREF = 'marionette.defaultPrefs.enabled';
|
||||
const MARIONETTE_FORCELOCAL_PREF = 'marionette.force-local';
|
||||
const MARIONETTE_LOG_PREF = 'marionette.logging';
|
||||
|
||||
this.ServerSocket = CC("@mozilla.org/network/server-socket;1",
|
||||
"nsIServerSocket",
|
||||
@ -31,21 +32,20 @@ function MarionetteComponent() {
|
||||
// set up the logger
|
||||
this.logger = Log.repository.getLogger("Marionette");
|
||||
this.logger.level = Log.Level["Trace"];
|
||||
let logf = FileUtils.getFile('ProfD', ['marionette.log']);
|
||||
|
||||
let dumper = false;
|
||||
let formatter = new Log.BasicFormatter();
|
||||
this.logger.addAppender(new Log.BoundedFileAppender(logf.path, formatter));
|
||||
#ifdef DEBUG
|
||||
dumper = true;
|
||||
#endif
|
||||
#ifdef MOZ_B2G
|
||||
dumper = true;
|
||||
#endif
|
||||
if (dumper) {
|
||||
this.logger.addAppender(new Log.DumpAppender(formatter));
|
||||
try {
|
||||
if (dumper || Services.prefs.getBoolPref(MARIONETTE_LOG_PREF)) {
|
||||
let formatter = new Log.BasicFormatter();
|
||||
this.logger.addAppender(new Log.DumpAppender(formatter));
|
||||
}
|
||||
}
|
||||
this.logger.info("MarionetteComponent loaded");
|
||||
catch(e) {}
|
||||
}
|
||||
|
||||
MarionetteComponent.prototype = {
|
||||
@ -100,9 +100,6 @@ MarionetteComponent.prototype = {
|
||||
this.observerService.addObserver(this, "domwindowopened", false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.logger.info("marionette not enabled via pref");
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case "final-ui-startup":
|
||||
|
Loading…
Reference in New Issue
Block a user