"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LogTempaleBean = exports.LogUtils = void 0;
var mslib_1 = require("mslib");
/**
 * 日志规范工具
 * @date 2023-09-15 11:38:20
 * @author 郁忠彪
 */
var LogUtils = /** @class */ (function () {
    function LogUtils() {
    }
    LogUtils.fatal = function (param) {
        return mslib_1.logger.fatal(this.getlogString(param));
    };
    LogUtils.error = function (param) {
        return mslib_1.logger.error(this.getlogString(param));
    };
    LogUtils.info = function (param) {
        return mslib_1.logger.info(this.getlogString(param));
    };
    LogUtils.debug = function (param) {
        return mslib_1.logger.debug(this.getlogString(param));
    };
    LogUtils.warn = function (param) {
        return mslib_1.logger.warn(this.getlogString(param));
    };
    LogUtils.getlogString = function (param) {
        if (!param.msgName && !param.msg && !param.parkId) {
            return '日志格式错误：msgName,msg,parkId为空！';
        }
        var logString = "[" + param.msgName + "]:[" + param.msg + "]:[\u8F66\u573Aid---" + param.parkId + "]";
        if (param.toMethod) {
            logString = logString + ("[" + param.toMethod + "]:");
        }
        if (param.url) {
            logString = logString + ("[" + param.url + "]:");
        }
        return logString;
    };
    return LogUtils;
}());
exports.LogUtils = LogUtils;
var LogTempaleBean = /** @class */ (function () {
    function LogTempaleBean() {
    }
    return LogTempaleBean;
}());
exports.LogTempaleBean = LogTempaleBean;
//# sourceMappingURL=LogUtils.js.map