How to use the defaults.bunyanLevels function in defaults

To help you get started, we’ve selected a few defaults examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rapid7 / le_node / src / node_modules / logger.js View on Github external
constructor(opts) {
		super({
			objectMode: true,
			highWaterMark: 0
		});

		opts = _.clone(opts || {});

		opts.timestamp = false;
		opts.levels    = opts.levels || defaults.bunyanLevels;

		this[$Logger] = new Logger(opts);

		this[$Logger].on('error', err => this.emit(err));
	}