@genexus/web-standard-functions
Version:
GeneXus JavaScript standard functions library for web generators
44 lines • 1.2 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GeneXusCommonLog = void 0;
class GeneXusCommonLog {
static write(message, topic = "", logLevel = 5) {
if (logLevel === 5) {
// debug
this.debug(message, topic);
}
else if (logLevel === 10) {
// info
this.info(message, topic);
}
else if (logLevel === 15) {
// warning
this.warning(message, topic);
}
else if (logLevel === 20) {
// error
this.logError(message, topic);
}
else if (logLevel === 30) {
// fatal
this.fatal(message, topic);
}
}
static logError(message, topic = "") {
console.error(message);
}
static warning(message, topic = "") {
console.warn(message);
}
static info(message, topic = "") {
console.info(message);
}
static debug(message, topic = "") {
console.debug(message);
}
static fatal(message, topic = "") {
console.error(message);
}
}
exports.GeneXusCommonLog = GeneXusCommonLog;
//# sourceMappingURL=log.js.map