mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-31 02:21:36 +00:00
add additional info in debug logs
This commit is contained in:
parent
8381502f3c
commit
da70afd3b3
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user