0.1.0 • Published 6 years ago

null-logger-light v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

null-logger-light

This library is intended to be used as a default null logger stand-in for javascript components that can optionally accept a bunyan logger.

Example

import nullLogger from 'null-logger-light';

class Something {
	constructor(logger = nullLogger) {
		this.log = logger;
	}
	doSomething() {
		const { log } = this;
		log.info('nothing unless logger was supplied to constructor');
	}
}