| const winston = require('winston'); | |
| const logger = winston.createLogger({ | |
| level: 'info', | |
| format: winston.format.combine(winston.format.timestamp(), winston.format.json()), | |
| transports: [ | |
| new winston.transports.Console(), | |
| new winston.transports.File({ filename: 'login-logs.log' }), | |
| ], | |
| }); | |
| module.exports = logger; | |