winston-visualize
v1.0.2
Published
Node.js module for express, main purpose of that module is make easy view winston logs
Downloads
3
Maintainers
Readme
winston-visualize
Installation
npm i winston-visualize
## or
yarn add winston-visualize
Example
//create index.js and set the following code
// install express and winston
const app = require('express')();
const winston = require('winston');
const logger = new (winston.Logger)({
transports: [
new (winston.transports.File)({
filename: 'winston.log'
})
]
});
require('winston-visualize')(app, logger);
app.listen(3000, function () {
logger.log('info', 'Hello distributed log files!');
});
After this run :
node index.js
visit: http://localhost:3000/logs