const winston = require('winston'); const moment = require('moment'); class Logger { constructor(manager) { this.manager = manager; this.logger = winston.createLogger({ transports: [ new winston.transports.Console(), new winston.transports.File({ filename: `logs/${this.date}.log` }), new winston.transports.File({ filename: `logs/${this.date}-error.log`, level: 'error' }) ] }); } get date() { return moment().format("MM-DD-YYYY-hh:mm:ss"); } } module.exports = Logger;