Socket
Socket
Sign inDemoInstall

console-extra

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-extra

A console extension module.


Version published
Maintainers
1
Created
Source

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!

Keywords

FAQs

Package last updated on 08 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc