Memory logger for winston
$ npm install winston-memory
Hook it up to winston like this:
var winston = require('winston');
require('winston-memory').Memory;
winston.add(winston.transports.Memory);
winston.remove(winston.transports.Console);
And you're ready to go. When you need to access your logged info, just access:
var transport = winston['default'].transports['memory'];
// Arrays with output and error lines
var outputs = transport.writeOutput;
var errors = transport.errorOutput;