Skip to content

andrerod/winston-memory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;

About

Memory logger for winston

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published