From da70afd3b32e15e51f87781ad526f1fb46c287b5 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Sun, 11 Aug 2019 14:32:15 -0700 Subject: [PATCH] add additional info in debug logs --- client.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client.js b/client.js index 9560fe4..6ddf184 100644 --- a/client.js +++ b/client.js @@ -127,9 +127,9 @@ class Client extends EventEmitter { * @param {number=} opts.left (if not set, calculated automatically) */ start (opts) { - debug('send `start`') opts = this._defaultAnnounceOpts(opts) opts.event = 'started' + debug('send `start` %o', opts) this._announce(opts) // start announcing on intervals @@ -147,9 +147,9 @@ class Client extends EventEmitter { * @param {number=} opts.left (if not set, calculated automatically) */ stop (opts) { - debug('send `stop`') opts = this._defaultAnnounceOpts(opts) opts.event = 'stopped' + debug('send `stop` %o', opts) this._announce(opts) } @@ -162,10 +162,10 @@ class Client extends EventEmitter { * @param {number=} opts.left (if not set, calculated automatically) */ complete (opts) { - debug('send `complete`') if (!opts) opts = {} opts = this._defaultAnnounceOpts(opts) opts.event = 'completed' + debug('send `complete` %o', opts) this._announce(opts) } @@ -178,9 +178,9 @@ class Client extends EventEmitter { * @param {number=} opts.left (if not set, calculated automatically) */ update (opts) { - debug('send `update`') opts = this._defaultAnnounceOpts(opts) if (opts.event) delete opts.event + debug('send `update` %o', opts) this._announce(opts) }