@cocalc/project
Version:
CoCalc: project daemon
23 lines • 778 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.init = void 0;
const logger_1 = require("./logger");
let bugCount = 0;
function init() {
const winston = (0, logger_1.getLogger)("BUG (uncaughtException)");
process.addListener("uncaughtException", (err) => {
bugCount += 1;
const border = `BUG (count=${bugCount}) ****************************************************************************`;
winston.debug(border);
winston.debug(`Uncaught exception: ${err}`);
winston.debug(err.stack);
winston.debug(border);
console?.trace?.();
});
}
exports.init = init;
function getBugCount() {
return bugCount;
}
exports.default = getBugCount;
//# sourceMappingURL=bug-counter.js.map