Skip to content

Commit

Permalink
Use the Chrome formatter when running in Electron
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Ferguson committed Oct 23, 2015
1 parent 0f1828f commit 4977254
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ module.exports = require('./common/minilog.js');

var consoleLogger = require('./node/console.js');

// if we are running inside Electron then use the web version of console.js
isChrome = (typeof navigator != 'undefined' && /chrome/i.test(navigator.userAgent));
if (isChrome) {
consoleLogger = require('./web/console.js').minilog;
}

// intercept the pipe method and transparently wrap the stringifier, if the
// destination is a Node core stream

Expand Down

0 comments on commit 4977254

Please sign in to comment.