@livy/util
Version:
Common utilities for the Livy logger
25 lines (24 loc) • 992 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AbstractLevelBubbleHandler = void 0;
const abstract_batch_handler_1 = require("./abstract-batch-handler");
const respect_level_mixin_1 = require("./respect-level-mixin");
/**
* Base Handler class providing basic a `bubble` option and basic `level` support
*/
class AbstractLevelBubbleHandler extends (0, respect_level_mixin_1.RespectLevelMixin)(abstract_batch_handler_1.AbstractBatchHandler) {
/**
* @param level The minimum logging level at which this handler will be triggered
* @param bubble Whether the messages that are handled can bubble up the stack or not
*/
constructor({ level = 'debug', bubble = true } = {}) {
super();
/**
* Whether this handler allows bubbling of records
*/
this.bubble = true;
this.level = level;
this.bubble = bubble;
}
}
exports.AbstractLevelBubbleHandler = AbstractLevelBubbleHandler;