swallow-logs

1.1.0 • Public • Published

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')

Package Sidebar

Install

npm i swallow-logs

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • acarl005