Bug 1378209 - Add DEBUG log line for received observer notifications. draft
authorHenrik Skupin <mail@hskupin.info>
Wed, 05 Jul 2017 10:35:28 +0200
changeset 604084 78a08f89c7a6d505266d02ca5e211e6fe227168f
parent 604083 d29f69e0e39c5004695f68bea2033758eacce6dc
child 636079 afe623e001472070e2ce73038cb273eb7a2545ce
push id66948
push userbmo:hskupin@gmail.com
push dateWed, 05 Jul 2017 08:40:39 +0000
bugs1378209
milestone56.0a1
Bug 1378209 - Add DEBUG log line for received observer notifications. For debugging purposes it would be useful to see which observer notifications have been received and handled by the Marionette component. MozReview-Commit-ID: 1EucCEjOXhu
testing/marionette/components/marionette.js
--- a/testing/marionette/components/marionette.js
+++ b/testing/marionette/components/marionette.js
@@ -154,16 +154,18 @@ MarionetteComponent.prototype = {
 MarionetteComponent.prototype.handle = function(cmdLine) {
   if (!this.enabled && cmdLine.handleFlag("marionette", false)) {
     this.enabled = true;
     this.logger.info("Enabled via --marionette");
   }
 };
 
 MarionetteComponent.prototype.observe = function(subject, topic, data) {
+  this.logger.debug(`Received observer notification "${topic}"`);
+
   switch (topic) {
     case "command-line-startup":
       Services.obs.removeObserver(this, topic);
       this.handle(subject);
 
     case "profile-after-change":
       // Using sessionstore-windows-restored as the xpcom category doesn't
       // seem to work, so we wait for that by adding an observer here.