Skip to content

Commit

Permalink
Migrate bin to use log util
Browse files Browse the repository at this point in the history
  • Loading branch information
samccone committed Oct 16, 2016
1 parent a89f988 commit 822949c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lighthouse-cli/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const yargs = require('yargs');
import * as Printer from './printer';
const lighthouse = require('../lighthouse-core');
const assetSaver = require('../lighthouse-core/lib/asset-saver.js');
const log = require('../lighthouse-core/lib/log');
import {ChromeLauncher} from './chrome-launcher';
import * as Commands from './commands/commands';

Expand Down Expand Up @@ -148,6 +149,8 @@ if (cli.verbose) {
flags.logLevel = 'error';
}

log.setLevel(flags.logLevel);

const cleanup = {
fns: [],
register(fn) {
Expand All @@ -168,7 +171,7 @@ function launchChromeAndRun(addresses) {
return launcher
.isDebuggerReady()
.catch(() => {
console.log('Launching Chrome...');
log.log('Lighthouse CLI', 'Launching Chrome...');
return launcher.run();
})
.then(() => lighthouseRun(addresses))
Expand Down

0 comments on commit 822949c

Please sign in to comment.