1.0.8 • Published 6 years ago

console-extra v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

Console-Extra

A module that allows logging to multiple streams simultaneously.

Setup

const Console = require('console-extra').ConsoleAsync;

delete console;

console = await Console(process.stdout, process.stderr); //bound to out and err respectively
//or
console = await Console(process.stdout, process.stderr, 'stream3.log'); //all bound to both err and out!
//or
console = await Console([ process.stdout, process.stderr, 'stream3.log', ... ]); //all bound to both err and out
//or
console = await Console({
	output: process.stdout,
	error: process.stderr
}); //bound to out and err respectively
//or
console = await Console({
	output: [ process.stdout, process.stderr ],
	error: 'file.txt'
}); //bound to out and err respectively - BEST

This module extends the builtin Console
Use the non-async version only for already-opened and writable streams!

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.5-0

6 years ago

1.0.4

6 years ago