Skip to content

Commit

Permalink
feat: improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Dec 10, 2013
1 parent e7fcd13 commit 9e1c399
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var SauceLabsBrowser = function(id, args, sauceConnect, /* config.sauceLabs */ c
var accessKey = process.env.SAUCE_ACCESS_KEY || args.accessKey || config.accessKey;
var tunnelIdentifier = args.tunnelIdentifier || config.tunnelIdentifier;
var browserName = args.browserName + (args.version ? ' ' + args.version : '') +
(args.platform ? ' (' + args.platform + ')' : '') + ' on SauceLabs';
(args.platform ? ' (' + args.platform + ')' : '');
var startConnect = config.startConnect !== false;
var log = logger.create('launcher.sauce');

Expand All @@ -81,12 +81,12 @@ var SauceLabsBrowser = function(id, args, sauceConnect, /* config.sauceLabs */ c
}

this.id = id;
this.name = browserName;
this.name = browserName + ' on SauceLabs';

var pendingHeartBeat;
var heartbeat = function() {
pendingHeartBeat = setTimeout(function() {
log.debug('Heartbeat to Sauce Labs - fetching title');
log.debug('Heartbeat to Sauce Labs (%s) - fetching title', browserName);
driver.title();
heartbeat();
}, 60000);
Expand Down Expand Up @@ -139,7 +139,7 @@ var SauceLabsBrowser = function(id, args, sauceConnect, /* config.sauceLabs */ c
};

log.info('%s session at https://saucelabs.com/tests/%s', browserName, driver.sessionID);
log.debug('WebDriver channel instantiated, opening ' + url);
log.debug('WebDriver channel for %s instantiated, opening %s', browserName, url);
driver.get(url, heartbeat);
});
};
Expand All @@ -163,7 +163,7 @@ var SauceLabsBrowser = function(id, args, sauceConnect, /* config.sauceLabs */ c
}

clearTimeout(pendingHeartBeat);
log.debug('Shutting down Sauce Labs driver');
log.debug('Shutting down the %s driver', browserName);
// workaround - navigate to other page to avoid re-connection
driver.get('about:blank', function() {
driver.quit(done);
Expand Down

0 comments on commit 9e1c399

Please sign in to comment.