print observer notifications to debug log
authorDan Mills <thunder@mozilla.com>
Sat, 27 Dec 2008 12:15:04 -0800
changeset 45141 d45ef1aa0a0024f58dc77a75d10e5a28188a0436
parent 45140 ecca1ea0c64274e3bae3808170f87b908fbf24e4
child 45142 09eb58e8599d1c698efa2483ef926b737ecd915d
push idunknown
push userunknown
push dateunknown
print observer notifications to debug log
services/sync/modules/wrap.js
--- a/services/sync/modules/wrap.js
+++ b/services/sync/modules/wrap.js
@@ -80,28 +80,31 @@ let Wrap = {
     let savedArgs = Array.prototype.slice.call(arguments, 3);
 
     return function WeaveNotifyWrapper(/* argN+1, argN+2, ... */) {
       let self = yield;
       let ret;
       let args = Array.prototype.slice.call(arguments);
 
       try {
+        this._log.debug("Event: " + this._osPrefix + savedName + ":start");
         this._os.notifyObservers(null, this._osPrefix + savedName + ":start", savedPayload);
         this._os.notifyObservers(null, this._osPrefix + "global:start", savedPayload);
 
         args = savedArgs.concat(args);
         args.unshift(this, savedMethod, self.cb);
         Async.run.apply(Async, args);
         ret = yield;
 
+        this._log.debug("Event: " + this._osPrefix + savedName + ":success");
         this._os.notifyObservers(null, this._osPrefix + savedName + ":success", savedPayload);
         this._os.notifyObservers(null, this._osPrefix + "global:success", savedPayload);
 
       } catch (e) {
+        this._log.debug("Event: " + this._osPrefix + savedName + ":error");
         this._os.notifyObservers(null, this._osPrefix + savedName + ":error", savedPayload);
         this._os.notifyObservers(null, this._osPrefix + "global:error", savedPayload);
         if (e != "Could not acquire lock") // FIXME HACK
           throw e;
       }
 
       self.done(ret);
     };