Skip to content

Commit

Permalink
cleanup: Tweak logging
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyparrish committed Feb 3, 2022
1 parent 8d080b9 commit 0db8b0f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ const LocalWebDriverBase = function(
browserName, driverCommand, argsFromPort, baseBrowserDecorator, logger) {
baseBrowserDecorator(this);

this.name = `${this.browserName} via WebDriver`;
const log = logger.create(this.name);

this.browserName = browserName;

if (driverCommand[0] == '/') {
Expand All @@ -47,6 +50,7 @@ const LocalWebDriverBase = function(
// File name. Assume it's in our driver cache.
driverCommand = path.join(DRIVER_CACHE, driverCommand);
}
log.debug(`Default driver command: ${driverCommand}`);

// Checked by the base class to determine what command to run.
this.DEFAULT_CMD = {
Expand All @@ -71,9 +75,6 @@ const LocalWebDriverBase = function(
};

const webDriver = url.format(config);
this.name = `${this.browserName} via WebDriver at ` + webDriver;

const log = logger.create(this.name);
log.debug('config:', JSON.stringify(config));

// These names ("browser" and "spec") are needed for compatibility with
Expand Down

0 comments on commit 0db8b0f

Please sign in to comment.