Bug 1378209 - Add INFO log lines for how Marionette got started. r=automatedtester

It is helpful to let the user know how Marionette get started. So
INFO log lines have to be added for the command line argument and
the environment variable.

This is especially helpful to get in case of missing observer
notifications, under which the server socket is not getting
created, and the client just hangs.

MozReview-Commit-ID: 4TEF33CDJKP

--HG--
extra : rebase_source : 3246fbcce4a3db2beddf82fa7b62ac482f37dcb1
This commit is contained in:
Henrik Skupin 2017-07-05 10:33:23 +02:00
Родитель 49921c11be
Коммит dccfbfd03e
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -116,7 +116,6 @@ const prefs = {
};
function MarionetteComponent() {
this.enabled = env.exists(ENV_ENABLED);
this.running = false;
this.server = null;
@ -129,6 +128,11 @@ function MarionetteComponent() {
this.finalUIStartup = false;
this.logger = this.setupLogger(prefs.logLevel);
this.enabled = env.exists(ENV_ENABLED);
if (this.enabled) {
this.logger.info(`Enabled via ${ENV_ENABLED}`);
}
}
MarionetteComponent.prototype = {
@ -148,8 +152,9 @@ MarionetteComponent.prototype = {
// Handle -marionette flag
MarionetteComponent.prototype.handle = function(cmdLine) {
if (cmdLine.handleFlag("marionette", false)) {
if (!this.enabled && cmdLine.handleFlag("marionette", false)) {
this.enabled = true;
this.logger.info("Enabled via --marionette");
}
};