From 0db8b0f7a69171d3645873cba7806c64bd18ed7d Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Thu, 3 Feb 2022 00:41:30 +0000 Subject: [PATCH] cleanup: Tweak logging --- index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 1a34bd6..c595e82 100644 --- a/index.js +++ b/index.js @@ -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] == '/') { @@ -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 = { @@ -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