whoowesme icon indicating copy to clipboard operation
whoowesme copied to clipboard

API: Add winston logger

Open samundra opened this issue 3 years ago • 0 comments

Winston logger is popular logging library. It will be helpful to integrate winston logging library so that we have access to request, response and their bodies along with other metadata info e.g. responseTime, request headers.

Library: https://www.npmjs.com/package/winston

import winston from 'winston';

import parse from 'co-body';

const logger: any = winston.createLogger({

    transports: [

        new winston.transports.Stream({ stream: process.stdout })

    ]

})

samundra avatar Apr 10 '21 02:04 samundra