Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Memory logger for winston
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
LICENSE.txt
README.md
package.json

README.md

winston-memory

Memory logger for winston

Install

$ npm install winston-memory

Use

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;
Something went wrong with that request. Please try again.