loggers.js 545 B

1234567891011121314151617
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.setLogLevels = exports.getLogger = void 0;
  4. const log4js_1 = require("log4js");
  5. const loggers = [];
  6. function getLogger(category) {
  7. const l = log4js_1.getLogger(category);
  8. l.level = 'info';
  9. loggers.push(l);
  10. return l;
  11. }
  12. exports.getLogger = getLogger;
  13. function setLogLevels(level) {
  14. loggers.forEach((l) => l.level = level !== null && level !== void 0 ? level : 'info');
  15. }
  16. exports.setLogLevels = setLogLevels;
  17. //# sourceMappingURL=loggers.js.map