whoowesme
whoowesme copied to clipboard
API: Add winston logger
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 })
]
})