import winston from 'winston'; const logger = winston.createLogger({ level: 'info', transports: [ new winston.transports.Console({ format: winston.format.combine( winston.format.colorize(), winston.format.simple(), ), }), new winston.transports.File({ filename: 'app.log', format: winston.format.combine( winston.format.timestamp(), winston.format.json(), ), }), ], }); export default logger;