winston.js 387 B

12345678910111213141516
  1. 'use strict';
  2. import path from 'path';
  3. import winston from '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. export default winston;