UNPKG

@livy/util

Version:
21 lines (20 loc) 758 B
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; } }