npm

Need private packages and team management tools?Check out npm Orgs. »

log-suppress

1.0.3 • Public • Published

log-suppress

build-status

A little tool that intercepts console.log output. Ideal for keeping tests output clean.

Especially handy for automated tests so that debug statements don't appear in the middle of test output.

Installation

npm install log-suppress --save

Usage

Log-Suppress takes the current console and optional environment

require("log-suppress").init(console);

Or for a specific environment

process.env.NODE_ENV = 'test'
require("log-suppress").init(console, 'test');

Other console modules

Using LogSuppress with other console loggers

require('console-ten').init(console);
require("log-suppress").init(console, 'test')
 

Developing Log-Suppress

If you are planning to fork this repo and continue developing it then here's some info.

Testing

Run the bash tests

make test

Automated Build

This package used travis to perform automated builds (see that build graphic at the top)

travis-ci

install

npm i log-suppress

Downloadsweekly downloads

110

version

1.0.3

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability