Skip to content

Commit b2187ca

Browse files
authored
fix(lighthouse): hide logs timestamp when running in tty (#50)
1 parent 05209ba commit b2187ca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lighthouse.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// prevent logger from prefixing a date when running in tty
2+
process.env.DEBUG_COLORS = 'true';
3+
14
const puppeteer = require('puppeteer');
25
const lighthouse = require('lighthouse');
36
const log = require('lighthouse-logger');
@@ -16,8 +19,6 @@ const getBrowserPath = async () => {
1619
const runLighthouse = async (browserPath, url) => {
1720
let chrome;
1821
try {
19-
// prevent logger from prefixing a date when running in tty
20-
require('debug').inspectOpts.colors = true;
2122
const logLevel = 'info';
2223
log.setLevel(logLevel);
2324
chrome = await chromeLauncher.launch({

0 commit comments

Comments
 (0)