@livy/util
Version:
Common utilities for the Livy logger
21 lines (20 loc) • 758 B
JavaScript
import { AbstractBatchHandler } from './abstract-batch-handler.mjs';
import { RespectLevelMixin } from './respect-level-mixin.mjs';
/**
* Base Handler class providing basic a `bubble` option and basic `level` support
*/
export class AbstractLevelBubbleHandler extends RespectLevelMixin(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;
}
}