Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

strip-chromium-logs

1.0.2 • Public • Published

strip-chromium-logs

stable

Strips Chromium logs from a stream, mainly useful for cleaning up Electron's process.stderr stream.

Install

npm install strip-chromium-logs --save

Example

var proc = require('child_process')
var electron = require('electron-prebuilt')
var logger = require('strip-chromium-logs')
var path = require('path')
 
var args = process.argv.slice(2)
var server = path.resolve(__dirname, 'server.js')
 
// spawn electron and print debugging to console
var p = proc.spawn(electron, [ server ].concat(args))
p.stdout.pipe(process.stdout)
p.stderr.pipe(logger()).pipe(process.stderr)

Before strip-chromium-logs:

before

After strip-chromium-logs:

after

Usage

NPM

stripChromiumLogs()

Returns a duplexer stream which ignores Chromium-looking logs (which can span several lines) but allows other lines to pass through.

License

MIT, see LICENSE.md for details.

Install

npm i strip-chromium-logs

DownloadsWeekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • avatar