@@ -48,7 +48,7 @@ function Client (peerId, port, torrent, opts) {
4848 self . _numWant = self . _opts . numWant || 50
4949 self . _intervalMs = self . _opts . interval || ( 30 * 60 * 1000 ) // default: 30 minutes
5050
51- debug ( 'new tracker client for ' + self . _infoHash . toString ( 'hex' ) )
51+ debug ( 'new client %s' , self . _infoHash . toString ( 'hex' ) )
5252
5353 if ( typeof torrent . announce === 'string' ) {
5454 // magnet-uri returns a string if the magnet uri only contains one 'tr' parameter
@@ -148,7 +148,7 @@ function Tracker (client, announceUrl, opts) {
148148
149149 self . client = client
150150
151- debug ( 'new tracker for ' + announceUrl )
151+ debug ( 'new tracker %s' , announceUrl )
152152
153153 self . _announceUrl = announceUrl
154154 self . _intervalMs = self . client . _intervalMs // use client interval initially
@@ -166,7 +166,7 @@ Tracker.prototype.start = function (opts) {
166166 opts = opts || { }
167167 opts . event = 'started'
168168
169- debug ( 'sent `start` to ' + self . _announceUrl )
169+ debug ( 'sent `start` %s' , self . _announceUrl )
170170 self . _announce ( opts )
171171 self . setInterval ( self . _intervalMs ) // start announcing on intervals
172172}
@@ -176,7 +176,7 @@ Tracker.prototype.stop = function (opts) {
176176 opts = opts || { }
177177 opts . event = 'stopped'
178178
179- debug ( 'sent `stop` to ' + self . _announceUrl )
179+ debug ( 'sent `stop` %s' , self . _announceUrl )
180180 self . _announce ( opts )
181181 self . setInterval ( 0 ) // stop announcing on intervals
182182}
@@ -187,15 +187,15 @@ Tracker.prototype.complete = function (opts) {
187187 opts . event = 'completed'
188188 opts . downloaded = opts . downloaded || self . torrentLength || 0
189189
190- debug ( 'sent `complete` to ' + self . _announceUrl )
190+ debug ( 'sent `complete` %s' , self . _announceUrl )
191191 self . _announce ( opts )
192192}
193193
194194Tracker . prototype . update = function ( opts ) {
195195 var self = this
196196 opts = opts || { }
197197
198- debug ( 'sent `update` to ' + self . _announceUrl )
198+ debug ( 'sent `update` %s' , self . _announceUrl )
199199 self . _announce ( opts )
200200}
201201
@@ -229,12 +229,12 @@ Tracker.prototype.scrape = function () {
229229 self . _scrapeUrl = self . _scrapeUrl || getScrapeUrl ( self . _announceUrl )
230230
231231 if ( ! self . _scrapeUrl ) {
232- debug ( 'scrape not supported by ' + self . _announceUrl )
232+ debug ( 'scrape not supported %s' , self . _announceUrl )
233233 self . client . emit ( 'error' , new Error ( 'scrape not supported for announceUrl ' + self . _announceUrl ) )
234234 return
235235 }
236236
237- debug ( 'sent `scrape` to ' + self . _announceUrl )
237+ debug ( 'sent `scrape` %s' , self . _announceUrl )
238238 self . _requestImpl ( self . _scrapeUrl , { _scrape : true } )
239239}
240240
0 commit comments