GT2/Ejectable/node_modules/logkitty/build/android/constants.js

38 lines
709 B
JavaScript
Raw Normal View History

2021-08-16 00:14:59 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Priority = void 0;
const codes = {
UNKNOWN: 0,
VERBOSE: 1,
DEBUG: 2,
INFO: 3,
WARN: 4,
ERROR: 5,
FATAL: 6,
SILENT: 7
};
const Priority = { ...codes,
fromName(name) {
const value = codes[name.toUpperCase()];
return value ? value : 0;
},
toName(code) {
return Object.keys(codes).find(key => codes[key] === code) || 'UNKNOWN';
},
fromLetter(letter) {
return codes[Object.keys(codes).find(key => key[0] === letter.toUpperCase()) || 'UNKNOWN'];
},
toLetter(code) {
return Priority.toName(code)[0];
}
};
exports.Priority = Priority;
//# sourceMappingURL=constants.js.map