Skip to content

Commit

Permalink
feat(browser): improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Nov 28, 2013
1 parent 44baac2 commit 71b542a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var Browser = function(id, fullName, /* capturedBrowsers */ collection, emitter,

events.bindAll(this, socket);

log.info('Connected on socket %s', socket.id);
log.info('Connected on socket %s with id %s', socket.id, id);

// TODO(vojta): move to collection
emitter.emit('browsers_change', collection);
Expand Down Expand Up @@ -127,7 +127,7 @@ var Browser = function(id, fullName, /* capturedBrowsers */ collection, emitter,
if (this.state === READY) {
disconnect();
} else if (this.state === EXECUTING) {
log.debug('Disconnected during run, waiting for reconnecting.');
log.debug('Disconnected during run, waiting %sms for reconnecting.', disconnectDelay);
this.state = EXECUTING_DISCONNECTED;

pendingDisconnect = timer.setTimeout(function() {
Expand All @@ -144,7 +144,7 @@ var Browser = function(id, fullName, /* capturedBrowsers */ collection, emitter,
this.state = EXECUTING;
log.debug('Reconnected.');
} else if (this.state === EXECUTING || this.state === READY) {
log.debug('New connection, forgetting the old one.');
log.debug('New connection %s, forgetting %s.', newSocket.id, socket.id);
// TODO(vojta): this should only remove this browser.onDisconnect listener
socket.removeAllListeners('disconnect');
}
Expand Down

0 comments on commit 71b542a

Please sign in to comment.