From b5dbdbf8d0d93cbac56950b54f6eacc0a56d4d3e Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Mon, 6 Jan 2025 17:45:05 +0100 Subject: [PATCH] Replace intel with sitespeed.io/log --- bin/browsertime.js | 5 +- lib/android/gnirehtet.js | 4 +- lib/android/index.js | 4 +- lib/android/root.js | 4 +- lib/chrome/chromeDevtoolsProtocol.js | 4 +- lib/chrome/har.js | 4 +- lib/chrome/networkManager.js | 4 +- lib/chrome/parseCpuTrace.js | 4 +- lib/chrome/traceCategoriesParser.js | 4 +- lib/chrome/webdriver/chromium.js | 4 +- lib/chrome/webdriver/setupChromiumOptions.js | 4 +- lib/chrome/webdriver/traceUtilities.js | 4 +- lib/connectivity/humble.js | 4 +- lib/connectivity/index.js | 4 +- lib/core/engine/collector.js | 4 +- lib/core/engine/command/addText.js | 4 +- lib/core/engine/command/android.js | 4 +- lib/core/engine/command/bidi.js | 4 +- lib/core/engine/command/cache.js | 4 +- .../engine/command/chromeDevToolsProtocol.js | 4 +- lib/core/engine/command/chromeTrace.js | 4 +- lib/core/engine/command/click.js | 4 +- lib/core/engine/command/debug.js | 4 +- lib/core/engine/command/geckoProfiler.js | 4 +- lib/core/engine/command/javaScript.js | 4 +- lib/core/engine/command/measure.js | 4 +- lib/core/engine/command/mouse/clickAndHold.js | 4 +- lib/core/engine/command/mouse/contextClick.js | 4 +- lib/core/engine/command/mouse/doubleClick.js | 4 +- lib/core/engine/command/mouse/mouseMove.js | 4 +- lib/core/engine/command/mouse/singleClick.js | 4 +- lib/core/engine/command/navigation.js | 4 +- lib/core/engine/command/screenshot.js | 4 +- lib/core/engine/command/scroll.js | 4 +- lib/core/engine/command/select.js | 4 +- lib/core/engine/command/set.js | 4 +- lib/core/engine/command/stopWatch.js | 4 +- lib/core/engine/command/switch.js | 4 +- lib/core/engine/command/wait.js | 4 +- lib/core/engine/index.js | 10 +- lib/core/engine/iteration.js | 4 +- lib/core/seleniumRunner.js | 20 +- lib/edge/webdriver/builder.js | 4 +- lib/firefox/firefoxBidi.js | 4 +- lib/firefox/geckoProfiler.js | 4 +- lib/firefox/memoryReport.js | 4 +- lib/firefox/networkManager.js | 4 +- lib/firefox/perfStats.js | 4 +- lib/firefox/webdriver/builder.js | 4 +- lib/firefox/webdriver/firefox.js | 4 +- lib/screenshot/index.js | 4 +- lib/support/browserScript.js | 9 +- lib/support/dns.js | 4 +- lib/support/engineUtils.js | 4 +- lib/support/fileUtil.js | 4 +- lib/support/getViewPort.js | 4 +- lib/support/har/index.js | 4 +- lib/support/logging.js | 53 ++--- lib/support/pathToFolder.js | 4 +- lib/support/preURL.js | 4 +- lib/support/statistics.js | 4 +- lib/support/stop.js | 4 +- lib/support/storageManager.js | 4 +- lib/support/util.js | 4 +- .../postprocessing/finetune/addTextToVideo.js | 4 +- .../postprocessing/finetune/convertFps.js | 4 +- lib/video/postprocessing/finetune/index.js | 4 +- .../postprocessing/finetune/removeOrange.js | 4 +- .../visualmetrics/getVideoMetrics.js | 4 +- .../visualmetrics/visualMetrics.js | 4 +- lib/video/screenRecording/android/recorder.js | 4 +- lib/video/screenRecording/desktop/convert.js | 4 +- .../desktop/desktopRecorder.js | 4 +- .../screenRecording/desktop/ffmpegRecorder.js | 4 +- .../screenRecording/desktop/osx/getScreen.js | 4 +- .../firefox/firefoxWindowRecorder.js | 4 +- lib/video/screenRecording/ios/convertToMp4.js | 4 +- lib/video/screenRecording/ios/iosRecorder.js | 4 +- .../iosSimulator/convertToMp4.js | 4 +- .../screenRecording/iosSimulator/recorder.js | 4 +- .../screenRecording/setOrangeBackground.js | 4 +- package-lock.json | 209 ++---------------- package.json | 2 +- test/util/setup.js | 8 +- 84 files changed, 207 insertions(+), 413 deletions(-) diff --git a/bin/browsertime.js b/bin/browsertime.js index 4f8d804679..f6f675f7f5 100755 --- a/bin/browsertime.js +++ b/bin/browsertime.js @@ -2,7 +2,7 @@ import merge from 'lodash.merge'; import get from 'lodash.get'; import set from 'lodash.set'; -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import { existsSync, mkdirSync } from 'node:fs'; import path from 'node:path'; import { Engine } from '../lib/core/engine/index.js'; @@ -17,7 +17,7 @@ import { StorageManager } from '../lib/support/storageManager.js'; import { loadScript } from '../lib/support/engineUtils.js'; import { isAndroidConfigured } from '../lib/android/index.js'; -const log = intel.getLogger('browsertime'); +const log = getLogger('browsertime'); const AsyncFunction = Object.getPrototypeOf(async function () {}).constructor; const delay = ms => new Promise(response => setTimeout(response, ms)); @@ -193,6 +193,7 @@ async function run(urls, options) { } } catch (error) { log.error('Error running browsertime', error); + console.log(error); process.exitCode = 1; } finally { process.exit(); diff --git a/lib/android/gnirehtet.js b/lib/android/gnirehtet.js index f8fb7c85e8..31898b0400 100644 --- a/lib/android/gnirehtet.js +++ b/lib/android/gnirehtet.js @@ -1,6 +1,6 @@ import { execa } from 'execa'; -import intel from 'intel'; -const log = intel.getLogger('browsertime.gnirehtet'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.gnirehtet'); const delay = ms => new Promise(response => setTimeout(response, ms)); export class Gnirehtet { diff --git a/lib/android/index.js b/lib/android/index.js index e0a4b87049..65d2c97fc3 100644 --- a/lib/android/index.js +++ b/lib/android/index.js @@ -3,13 +3,13 @@ import { mkdir as _mkdir, createWriteStream } from 'node:fs'; import path from 'node:path'; import { EOL as endOfLine } from 'node:os'; import { execa } from 'execa'; -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import pkg from '@devicefarmer/adbkit'; import usbPowerProfiler from 'usb-power-profiling/usb-power-profiling.js'; const { Adb } = pkg; import get from 'lodash.get'; import { pathToFolder } from '../support/pathToFolder.js'; -const log = intel.getLogger('browsertime.android'); +const log = getLogger('browsertime.android'); const mkdir = promisify(_mkdir); const delay = ms => new Promise(res => setTimeout(res, ms)); diff --git a/lib/android/root.js b/lib/android/root.js index 36174fca05..70b72669e0 100644 --- a/lib/android/root.js +++ b/lib/android/root.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.android'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.android'); // Adopted from // https://dxr.mozilla.org/mozilla-central/source/testing/raptor/raptor/performance_tuning.py diff --git a/lib/chrome/chromeDevtoolsProtocol.js b/lib/chrome/chromeDevtoolsProtocol.js index 7c6c3ce64a..7075214169 100644 --- a/lib/chrome/chromeDevtoolsProtocol.js +++ b/lib/chrome/chromeDevtoolsProtocol.js @@ -1,6 +1,6 @@ -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import CDP from 'chrome-remote-interface'; -const log = intel.getLogger('browsertime.chrome.cdp'); +const log = getLogger('browsertime.chrome.cdp'); import { toArray } from '../support/util.js'; import { traceCategories as defaultTraceCategories } from './settings/traceCategories.js'; diff --git a/lib/chrome/har.js b/lib/chrome/har.js index 9f979cfa5f..d791d8df35 100644 --- a/lib/chrome/har.js +++ b/lib/chrome/har.js @@ -1,7 +1,7 @@ -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import { harFromMessages } from 'chrome-har'; import { logging } from 'selenium-webdriver'; -const log = intel.getLogger('browsertime.chrome'); +const log = getLogger('browsertime.chrome'); import { addBrowser } from '../support/har/index.js'; const { Type } = logging; diff --git a/lib/chrome/networkManager.js b/lib/chrome/networkManager.js index b50a8c636f..df85793d00 100644 --- a/lib/chrome/networkManager.js +++ b/lib/chrome/networkManager.js @@ -1,7 +1,7 @@ -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import get from 'lodash.get'; -const log = intel.getLogger('browsertime.chrome.network'); +const log = getLogger('browsertime.chrome.network'); export class NetworkManager { constructor(cdpClient, options) { diff --git a/lib/chrome/parseCpuTrace.js b/lib/chrome/parseCpuTrace.js index 7e4306e0f9..03d7570547 100644 --- a/lib/chrome/parseCpuTrace.js +++ b/lib/chrome/parseCpuTrace.js @@ -1,6 +1,6 @@ -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import { computeMainThreadTasks } from '@sitespeed.io/tracium'; -const log = intel.getLogger('browsertime.chrome.cpu'); +const log = getLogger('browsertime.chrome.cpu'); function round(number_, decimals = 3) { const pow = Math.pow(10, decimals); diff --git a/lib/chrome/traceCategoriesParser.js b/lib/chrome/traceCategoriesParser.js index 92fc94d984..69c86e7dc3 100644 --- a/lib/chrome/traceCategoriesParser.js +++ b/lib/chrome/traceCategoriesParser.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.chrome.trace'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.chrome.trace'); // Adopting the Lighthouse way to clean the Trace log // https://github.com/GoogleChrome/lighthouse/blob/50a68ab2bf0115427e767e5e40dfe6be671902fe/lighthouse-core/config/config.js#L29-L110 diff --git a/lib/chrome/webdriver/chromium.js b/lib/chrome/webdriver/chromium.js index bbc9b4b084..e9188dbc7b 100644 --- a/lib/chrome/webdriver/chromium.js +++ b/lib/chrome/webdriver/chromium.js @@ -2,9 +2,9 @@ import { promisify } from 'node:util'; import { unlink as _unlink, rm as _rm } from 'node:fs'; import path from 'node:path'; import { logging } from 'selenium-webdriver'; -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import usbPowerProfiler from 'usb-power-profiling/usb-power-profiling.js'; -const log = intel.getLogger('browsertime.chrome'); +const log = getLogger('browsertime.chrome'); const { Type } = logging; import { longTaskMetrics } from '../longTaskMetrics.js'; import { parseCPUTrace } from '../parseCpuTrace.js'; diff --git a/lib/chrome/webdriver/setupChromiumOptions.js b/lib/chrome/webdriver/setupChromiumOptions.js index b6625ed04e..aedde0bb73 100644 --- a/lib/chrome/webdriver/setupChromiumOptions.js +++ b/lib/chrome/webdriver/setupChromiumOptions.js @@ -1,11 +1,11 @@ import { readFileSync } from 'node:fs'; -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import { chromeDesktopOptions as defaultChromeOptions } from '../settings/chromeDesktopOptions.js'; import { chromeAndroidOptions as defaultAndroidChromeOptions } from '../settings/chromeAndroidOptions.js'; import { getViewPort } from '../../support/getViewPort.js'; import { toArray } from '../../support/util.js'; import { isAndroidConfigured } from '../../android/index.js'; -const log = intel.getLogger('browsertime.chrome'); +const log = getLogger('browsertime.chrome'); const CHROME_AMD_EDGE_INTERNAL_PHONE_HOME = [ 'MAP cache.pack.google.com 127.0.0.1', diff --git a/lib/chrome/webdriver/traceUtilities.js b/lib/chrome/webdriver/traceUtilities.js index be11658bfc..573b361115 100644 --- a/lib/chrome/webdriver/traceUtilities.js +++ b/lib/chrome/webdriver/traceUtilities.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.chrome'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.chrome'); function getLargestContentfulPaintEvent(traceEvents) { const lcpCandidates = traceEvents.filter( diff --git a/lib/connectivity/humble.js b/lib/connectivity/humble.js index 48ea12a1e0..860d5d702c 100644 --- a/lib/connectivity/humble.js +++ b/lib/connectivity/humble.js @@ -1,8 +1,8 @@ import http from 'node:http'; import https from 'node:https'; import get from 'lodash.get'; -import intel from 'intel'; -const log = intel.getLogger('browsertime.connectivity.humble'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.connectivity.humble'); export class Humble { constructor(options) { diff --git a/lib/connectivity/index.js b/lib/connectivity/index.js index 61a26dfedf..a071def66e 100644 --- a/lib/connectivity/index.js +++ b/lib/connectivity/index.js @@ -1,10 +1,10 @@ import get from 'lodash.get'; -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import { start as throttleStart, stop as throttleStop } from '@sitespeed.io/throttle'; -const log = intel.getLogger('browsertime.connectivity'); +const log = getLogger('browsertime.connectivity'); import { Humble } from './humble.js'; import { parseTrafficShapeConfig } from './trafficShapeParser.js'; diff --git a/lib/core/engine/collector.js b/lib/core/engine/collector.js index 9f7e58ba32..bc0a086c6b 100644 --- a/lib/core/engine/collector.js +++ b/lib/core/engine/collector.js @@ -1,7 +1,7 @@ import path from 'node:path'; import { createRequire } from 'node:module'; import get from 'lodash.get'; -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import { timestamp as _timestamp } from '../../support/engineUtils.js'; import { Statistics } from '../../support/statistics.js'; import { pathToFolder } from '../../support/pathToFolder.js'; @@ -9,7 +9,7 @@ import { getConnectivitySettings } from '../../connectivity/index.js'; import { formatMetric } from '../../support/util.js'; const require = createRequire(import.meta.url); const version = require('../../../package.json').version; -const log = intel.getLogger('browsertime'); +const log = getLogger('browsertime'); function getNewResult(url, options) { return { diff --git a/lib/core/engine/command/addText.js b/lib/core/engine/command/addText.js index 1d7e890494..beb40577a3 100644 --- a/lib/core/engine/command/addText.js +++ b/lib/core/engine/command/addText.js @@ -1,6 +1,6 @@ import { By } from 'selenium-webdriver'; -import intel from 'intel'; -const log = intel.getLogger('browsertime.command.addText'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.command.addText'); /** * Provides functionality to add text to elements on a web page using various selectors. diff --git a/lib/core/engine/command/android.js b/lib/core/engine/command/android.js index 48e67a6a61..03c9cc6a54 100644 --- a/lib/core/engine/command/android.js +++ b/lib/core/engine/command/android.js @@ -1,6 +1,6 @@ -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import { Android, isAndroidConfigured } from '../../../android/index.js'; -const log = intel.getLogger('browsertime.command.android'); +const log = getLogger('browsertime.command.android'); /** * Provides functionality to interact with an Android device through shell commands. * @class diff --git a/lib/core/engine/command/bidi.js b/lib/core/engine/command/bidi.js index 97e776edc2..997474bf77 100644 --- a/lib/core/engine/command/bidi.js +++ b/lib/core/engine/command/bidi.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.command.bidi'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.command.bidi'); /** * Manages interactions using Bidi. At the moment this only works for Firefox diff --git a/lib/core/engine/command/cache.js b/lib/core/engine/command/cache.js index f11cf9ace3..8014bb28b2 100644 --- a/lib/core/engine/command/cache.js +++ b/lib/core/engine/command/cache.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.command.cache'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.command.cache'); /** * Manage the browser cache. * This class provides methods to clear the cache and cookies in different browsers. diff --git a/lib/core/engine/command/chromeDevToolsProtocol.js b/lib/core/engine/command/chromeDevToolsProtocol.js index fccb50d892..0b21d2ca04 100644 --- a/lib/core/engine/command/chromeDevToolsProtocol.js +++ b/lib/core/engine/command/chromeDevToolsProtocol.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.command.devtoolsprotocol'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.command.devtoolsprotocol'); /** * Manages interactions with the Chrome DevTools Protocol for Chrome and Edge browsers. diff --git a/lib/core/engine/command/chromeTrace.js b/lib/core/engine/command/chromeTrace.js index f5f8d3b8c5..afe5880725 100644 --- a/lib/core/engine/command/chromeTrace.js +++ b/lib/core/engine/command/chromeTrace.js @@ -1,9 +1,9 @@ -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import { getRenderBlocking } from '../../../chrome/webdriver/traceUtilities.js'; import { parse } from '../../../chrome/traceCategoriesParser.js'; import { parseCPUTrace } from '../../../chrome/parseCpuTrace.js'; -const log = intel.getLogger('browsertime.command.chrometrace'); +const log = getLogger('browsertime.command.chrometrace'); /** * Manages Chrome trace functionality, enabling custom profiling and trace collection in Chrome. * diff --git a/lib/core/engine/command/click.js b/lib/core/engine/command/click.js index fee1406d14..9d0cb8430a 100644 --- a/lib/core/engine/command/click.js +++ b/lib/core/engine/command/click.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.command.click'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.command.click'); function addClick(js) { const trimmed = js.trim(); diff --git a/lib/core/engine/command/debug.js b/lib/core/engine/command/debug.js index 5d0e6be18f..e3f96915af 100644 --- a/lib/core/engine/command/debug.js +++ b/lib/core/engine/command/debug.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.command.debug'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.command.debug'); const delay = ms => new Promise(res => setTimeout(res, ms)); /** diff --git a/lib/core/engine/command/geckoProfiler.js b/lib/core/engine/command/geckoProfiler.js index 523ce9a05e..36a41bdad7 100644 --- a/lib/core/engine/command/geckoProfiler.js +++ b/lib/core/engine/command/geckoProfiler.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.command.geckoprofiler'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.command.geckoprofiler'); /** * Manages the Gecko Profiler for profiling Firefox performance. * diff --git a/lib/core/engine/command/javaScript.js b/lib/core/engine/command/javaScript.js index 603ef79f75..6e70e511d2 100644 --- a/lib/core/engine/command/javaScript.js +++ b/lib/core/engine/command/javaScript.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.command.javascript'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.command.javascript'); /** * Provides functionality to execute JavaScript code in the context of the current page. * diff --git a/lib/core/engine/command/measure.js b/lib/core/engine/command/measure.js index 538bba853e..67435e269f 100644 --- a/lib/core/engine/command/measure.js +++ b/lib/core/engine/command/measure.js @@ -1,5 +1,5 @@ import path from 'node:path'; -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import get from 'lodash.get'; import merge from 'lodash.merge'; import { timestamp as _timestamp } from '../../../support/engineUtils.js'; @@ -15,7 +15,7 @@ import { TCPDump } from '../../../support/tcpdump.js'; import { lcpHighlightScript as highlightLargestContentfulPaint } from './util/lcpHighlightScript.js'; import { clsHighlightScript as highlightLS } from './util/lsHighlightScript.js'; const delay = ms => new Promise(res => setTimeout(res, ms)); -const log = intel.getLogger('browsertime.command.measure'); +const log = getLogger('browsertime.command.measure'); // In some cases we could have one alias mapped to multiple URLs // we've seen it for login etc where the user get different query parameter diff --git a/lib/core/engine/command/mouse/clickAndHold.js b/lib/core/engine/command/mouse/clickAndHold.js index cfce0d8193..eab829b632 100644 --- a/lib/core/engine/command/mouse/clickAndHold.js +++ b/lib/core/engine/command/mouse/clickAndHold.js @@ -1,6 +1,6 @@ -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import { By, Origin } from 'selenium-webdriver'; -const log = intel.getLogger('browsertime.command.mouse'); +const log = getLogger('browsertime.command.mouse'); /** * Provides functionality to click and hold elements on a web page using different strategies. diff --git a/lib/core/engine/command/mouse/contextClick.js b/lib/core/engine/command/mouse/contextClick.js index e7c43845fe..84c8dc0bdd 100644 --- a/lib/core/engine/command/mouse/contextClick.js +++ b/lib/core/engine/command/mouse/contextClick.js @@ -1,6 +1,6 @@ -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import { By } from 'selenium-webdriver'; -const log = intel.getLogger('browsertime.command.mouse'); +const log = getLogger('browsertime.command.mouse'); /** * Provides functionality to perform a context click (right-click) on elements in a web page. diff --git a/lib/core/engine/command/mouse/doubleClick.js b/lib/core/engine/command/mouse/doubleClick.js index bbafa95de5..5474eeb3e7 100644 --- a/lib/core/engine/command/mouse/doubleClick.js +++ b/lib/core/engine/command/mouse/doubleClick.js @@ -1,6 +1,6 @@ -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import { By } from 'selenium-webdriver'; -const log = intel.getLogger('browsertime.command.mouse'); +const log = getLogger('browsertime.command.mouse'); /** * Provides functionality to perform a double-click action on elements in a web page. * diff --git a/lib/core/engine/command/mouse/mouseMove.js b/lib/core/engine/command/mouse/mouseMove.js index ac5861ca88..8785bc8442 100644 --- a/lib/core/engine/command/mouse/mouseMove.js +++ b/lib/core/engine/command/mouse/mouseMove.js @@ -1,6 +1,6 @@ -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import { By, Origin } from 'selenium-webdriver'; -const log = intel.getLogger('browsertime.command.mouse'); +const log = getLogger('browsertime.command.mouse'); /** * Provides functionality to move the mouse cursor to elements or specific positions on a web page. * diff --git a/lib/core/engine/command/mouse/singleClick.js b/lib/core/engine/command/mouse/singleClick.js index 974d4813d7..8852a9e176 100644 --- a/lib/core/engine/command/mouse/singleClick.js +++ b/lib/core/engine/command/mouse/singleClick.js @@ -1,6 +1,6 @@ -import intel from 'intel'; +import { getLogger } from '@sitespeed.io/log'; import { By } from 'selenium-webdriver'; -const log = intel.getLogger('browsertime.command.mouse'); +const log = getLogger('browsertime.command.mouse'); /** * Provides functionality to perform a single click action on elements or at specific positions in a web page. Uses Seleniums Action API. diff --git a/lib/core/engine/command/navigation.js b/lib/core/engine/command/navigation.js index 22b0d8e91b..125ee4e934 100644 --- a/lib/core/engine/command/navigation.js +++ b/lib/core/engine/command/navigation.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.command.navigation'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.command.navigation'); /** * Provides functionality to control browser navigation such as back, forward, and refresh actions. diff --git a/lib/core/engine/command/screenshot.js b/lib/core/engine/command/screenshot.js index 9232de41fb..b47f4850ca 100644 --- a/lib/core/engine/command/screenshot.js +++ b/lib/core/engine/command/screenshot.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.command.screenshot'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.command.screenshot'); /** * Take a screenshot. The screenshot will be stored to disk, diff --git a/lib/core/engine/command/scroll.js b/lib/core/engine/command/scroll.js index 0230abfbd9..e8e14ebd95 100644 --- a/lib/core/engine/command/scroll.js +++ b/lib/core/engine/command/scroll.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.command.scroll'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.command.scroll'); const delay = ms => new Promise(res => setTimeout(res, ms)); /** diff --git a/lib/core/engine/command/select.js b/lib/core/engine/command/select.js index f3eafb105b..a9868b9f7f 100644 --- a/lib/core/engine/command/select.js +++ b/lib/core/engine/command/select.js @@ -1,5 +1,5 @@ -import intel from 'intel'; -const log = intel.getLogger('browsertime.command.select'); +import { getLogger } from '@sitespeed.io/log'; +const log = getLogger('browsertime.command.select'); /** * Provides functionality to interact with `