From 2e2ef6f2b709f2328b517043341ee08e251740e3 Mon Sep 17 00:00:00 2001 From: erezrokah Date: Sun, 21 Jun 2020 15:16:03 +0300 Subject: [PATCH] fix(logger): pass colors=true to debug module this prevents the debug module from prefixing a date string to log messages in tty --- src/lighthouse.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lighthouse.js b/src/lighthouse.js index 57d271ed..d7d1d198 100644 --- a/src/lighthouse.js +++ b/src/lighthouse.js @@ -16,6 +16,8 @@ const getBrowserPath = async () => { const runLighthouse = async (browserPath, url) => { let chrome; try { + // prevent logger from prefixing a date when running in tty + require('debug').inspectOpts.colors = true; const logLevel = 'info'; log.setLevel(logLevel); chrome = await chromeLauncher.launch({