lib/console.js
function ConsoleLogger(options) {
	EventEmitter.call(this);
	this.options = options || {};
	// allow use to customize if they want the label or not
	this.prefix = this.options.prefix === undefined ? true : this.options.prefix;
	this.showcr = this.options.showcr === undefined ? true : this.options.showcr;
	this.showtab = this.options.showtab === undefined ? true : this.options.showtab;
	this.colorize = this.options.colorize === undefined ? checkColorize() : this.options.colorize;
	this.logPrepend = this.options.logPrepend;
	chalk.enabled = !!this.colorize;

	// if we are logging from a cluster worker, prepend the process PID
	// istanbul ignore if
	if (cluster.isWorker) {
		if (chalk.enabled) {
			this.logPrepend = chalk.black.inverse(String(process.pid)) + grey(' |');
		} else {
			this.logPrepend = process.pid + ' |';
		}
	}
	this.remapLevels();
}
function ConsoleLogger(options) {
	EventEmitter.call(this);
	this.options = options || {};
	// allow use to customize if they want the label or not
	this.prefix = this.options.prefix === undefined ? true : this.options.prefix;
	this.showcr = this.options.showcr === undefined ? true : this.options.showcr;
	this.showtab = this.options.showtab === undefined ? true : this.options.showtab;
	this.colorize = this.options.colorize === undefined ? checkColorize() : this.options.colorize;
	this.logPrepend = this.options.logPrepend;
	chalk.enabled = !!this.colorize;

	// if we are logging from a cluster worker, prepend the process PID
	// istanbul ignore if
	if (cluster.isWorker) {
		if (chalk.enabled) {
			this.logPrepend = chalk.black.inverse(String(process.pid)) + grey(' |');
		} else {
			this.logPrepend = process.pid + ' |';
		}
	}
	this.remapLevels();
}
function ConsoleLogger ( options ) { EventEmitter . call ( this ) ; this . options = options || { } ; // allow use to customize if they want the label or not this . prefix = this . options . prefix === undefined ? true : this . options . prefix ; this . showcr = this . options . showcr === undefined ? true : this . options . showcr ; this . showtab = this . options . showtab === undefined ? true : this . options . showtab ; this . colorize = this . options . colorize === undefined ? checkColorize ( ) : this . options . colorize ; this . logPrepend = this . options . logPrepend ; chalk . enabled = ! ! this . colorize ; // if we are logging from a cluster worker, prepend the process PID // istanbul ignore if if ( cluster . isWorker ) { if ( chalk . enabled ) { this . logPrepend = chalk . black . inverse ( String ( process . pid ) ) + grey ( ' |' ) ; } else { this . logPrepend = process . pid + ' |' ; } } this . remapLevels ( ) ; }
Console logging functionality

@param {Object} options - options
Console logging functionality