winston.js 385 B

1234567891011121314
  1. const path = require('path');
  2. const winston = require('winston');
  3. winston.add(winston.transports.File, {
  4. filename: path.join(__dirname, 'logs/games.log'),
  5. handleExceptions: true,
  6. exitOnError: false,
  7. json: false
  8. });
  9. winston.remove(winston.transports.Console);
  10. winston.handleExceptions(new winston.transports.Console());
  11. winston.exitOnError = false;
  12. module.exports = winston;