winston-visualize

1.0.2 • Public • Published

winston-visualize

npm version  https://img.shields.io/npm/dm/winston-visualize.svg

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

image

Package Sidebar

Install

npm i winston-visualize

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

66.2 kB

Total Files

6

Last publish

Collaborators

  • miladezzat