swallow-logs

Run isolated procedures for which the log output is discarded.


Keywords
null, dev, log, console, swallow
License
MIT
Install
npm install swallow-logs@1.1.0

Documentation

node-swallow-logs

Need to disable log output for just a little bit? Wrap that procedure in this function which will momentarily overwrite console.log and then set it back after the procedure is done.

Get started

npm install swallow-logs

Usage

const swallowLogs = require('swallow-logs')
swallowLogs(() => {
  console.log('this will not get logged')  
}
console.log('but this will')