typescript-logging
Version:
Library for logging, written in typescript, can be used by normal es5+ javascript as well.
81 lines • 2.86 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var LoggerOptions_1 = require("../LoggerOptions");
/**
* Represents the runtime settings for a LogGroup (LogGroupRule).
*/
var LogGroupRuntimeSettings = (function () {
function LogGroupRuntimeSettings(logGroupRule) {
this._formatterLogMessage = null;
this._logGroupRule = logGroupRule;
this._level = logGroupRule.level;
this._loggerType = logGroupRule.loggerType;
this._logFormat = new LoggerOptions_1.LogFormat(new LoggerOptions_1.DateFormat(logGroupRule.logFormat.dateFormat.formatEnum, logGroupRule.logFormat.dateFormat.dateSeparator), logGroupRule.logFormat.showTimeStamp, logGroupRule.logFormat.showLoggerName);
this._callBackLogger = logGroupRule.callBackLogger;
this._formatterLogMessage = logGroupRule.formatterLogMessage;
}
Object.defineProperty(LogGroupRuntimeSettings.prototype, "logGroupRule", {
/**
* Returns original LogGroupRule (so not runtime settings!)
* @return {LogGroupRule}
*/
get: function () {
return this._logGroupRule;
},
enumerable: true,
configurable: true
});
Object.defineProperty(LogGroupRuntimeSettings.prototype, "level", {
get: function () {
return this._level;
},
set: function (value) {
this._level = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(LogGroupRuntimeSettings.prototype, "loggerType", {
get: function () {
return this._loggerType;
},
set: function (value) {
this._loggerType = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(LogGroupRuntimeSettings.prototype, "logFormat", {
get: function () {
return this._logFormat;
},
set: function (value) {
this._logFormat = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(LogGroupRuntimeSettings.prototype, "callBackLogger", {
get: function () {
return this._callBackLogger;
},
set: function (value) {
this._callBackLogger = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(LogGroupRuntimeSettings.prototype, "formatterLogMessage", {
get: function () {
return this._formatterLogMessage;
},
set: function (value) {
this._formatterLogMessage = value;
},
enumerable: true,
configurable: true
});
return LogGroupRuntimeSettings;
}());
exports.LogGroupRuntimeSettings = LogGroupRuntimeSettings;
//# sourceMappingURL=LogGroupRuntimeSettings.js.map