lib/problem.js
function ProblemLogger(options) {
	options = options || {};
	ConsoleLogger.call(this);
	const tmpdir = require('os').tmpdir();
	this.filename = path.join(tmpdir, 'logger-' + (+new Date()) + '.log');
	this.name = options.problemLogName || ((options.name || 'problem') + '.log');
	this.stream = fs.createWriteStream(this.filename);
	this.write({ level: bunyan.TRACE, msg: util.format('log file opened') });
	streams.push(this);
}
function ProblemLogger(options) {
	options = options || {};
	ConsoleLogger.call(this);
	const tmpdir = require('os').tmpdir();
	this.filename = path.join(tmpdir, 'logger-' + (+new Date()) + '.log');
	this.name = options.problemLogName || ((options.name || 'problem') + '.log');
	this.stream = fs.createWriteStream(this.filename);
	this.write({ level: bunyan.TRACE, msg: util.format('log file opened') });
	streams.push(this);
}
function ProblemLogger ( options ) { options = options || { } ; ConsoleLogger . call ( this ) ; const tmpdir = require ( 'os' ) . tmpdir ( ) ; this . filename = path . join ( tmpdir , 'logger-' + ( + new Date ( ) ) + '.log' ) ; this . name = options . problemLogName || ( ( options . name || 'problem' ) + '.log' ) ; this . stream = fs . createWriteStream ( this . filename ) ; this . write ( { level : bunyan . TRACE , msg : util . format ( 'log file opened' ) } ) ; streams . push ( this ) ; }
Logger stream that will only write out a log file
if the process exits non-zero in the current directory

@param {Object} options - options
@constructor
Logger stream that will only write out a log file if the process exits non - zero in the current directory