winston.js 399 B

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