"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const LogLevel_1 = require("./LogLevel");
class LoggerImpl {
    constructor(name, level, channel) {
        this.name = name;
        this.level = level;
        this.channel = channel;
    }
    warn(message, obj) {
        if (this.level >= LogLevel_1.LogLevel.WARN) {
            this.channel.warn(Date.now(), this.name, message, obj);
        }
    }
    info(message, obj) {
        if (this.level >= LogLevel_1.LogLevel.INFO) {
            this.channel.info(Date.now(), this.name, message, obj);
        }
    }
    error(message, obj) {
        if (this.level >= LogLevel_1.LogLevel.ERROR) {
            this.channel.error(Date.now(), this.name, message, obj);
        }
    }
    debug(message, obj) {
        if (this.level >= LogLevel_1.LogLevel.DEBUG) {
            this.channel.debug(Date.now(), this.name, message, obj);
        }
    }
    fatal(message, obj) {
        if (this.level >= LogLevel_1.LogLevel.FATAL) {
            this.channel.fatal(Date.now(), this.name, message, obj);
        }
    }
}
exports.LoggerImpl = LoggerImpl;
//# sourceMappingURL=LoggerImpl.js.map