@arpinum/log
Version:
Simple module to log on stdout or stderr
37 lines (36 loc) • 868 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.levels = exports.Level = void 0;
var Level;
(function (Level) {
Level["all"] = "all";
Level["debug"] = "debug";
Level["info"] = "info";
Level["warn"] = "warn";
Level["error"] = "error";
Level["off"] = "off";
})(Level || (exports.Level = Level = {}));
exports.levels = {
[Level.all]: {
priority: 1,
},
[Level.debug]: {
priority: 2,
log: (console) => console.debug || console.log,
},
[Level.info]: {
priority: 3,
log: (console) => console.log,
},
[Level.warn]: {
priority: 4,
log: (console) => console.warn || console.log,
},
[Level.error]: {
priority: 5,
log: (console) => console.error || console.log,
},
off: {
priority: 6,
},
};