import { LogLevel } from "./LogLevel.js";

export class LoggerBackend {


    /**
     * @private
     * @type {LogLevel|number}
     */
    level = LogLevel.Info;


    /**
     *
     * @returns {LogLevel|number}
     */
    getLevel() {
        return this.level;
    }

    /**
     *
     * @param {LogLevel} v
     */
    setLevel(v) {
        this.level = v;
    }

    /**
     *
     * @param {LogLevel} level
     * @param {string} message
     * @returns {void}
     */
    log(level, message) {
        throw new Error('Abstract class, method needs to be implemented in the subclass');
    }
}
