logger.js 618 B

123456789101112
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.logger = void 0;
  4. var winston_1 = require("winston");
  5. exports.logger = (0, winston_1.createLogger)({
  6. level: 'info',
  7. format: winston_1.format.combine(winston_1.format.timestamp(), winston_1.format.printf(function (_a) {
  8. var timestamp = _a.timestamp, level = _a.level, message = _a.message;
  9. return "".concat(timestamp, " [").concat(level.toUpperCase(), "] ").concat(message);
  10. })),
  11. transports: [new winston_1.transports.Console(), new winston_1.transports.File({ filename: 'total.log' })]
  12. });