@pristine-ts/logging 0.0.170 → 0.0.174
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/cjs/enums/output-mode.enum.js +9 -0
- package/dist/lib/cjs/enums/output-mode.enum.js.map +1 -1
- package/dist/lib/cjs/enums/severity.enum.js +3 -0
- package/dist/lib/cjs/enums/severity.enum.js.map +1 -1
- package/dist/lib/cjs/handlers/log.handler.js +66 -10
- package/dist/lib/cjs/handlers/log.handler.js.map +1 -1
- package/dist/lib/cjs/loggers/base.logger.js +62 -1
- package/dist/lib/cjs/loggers/base.logger.js.map +1 -1
- package/dist/lib/cjs/loggers/console.logger.js +35 -3
- package/dist/lib/cjs/loggers/console.logger.js.map +1 -1
- package/dist/lib/cjs/loggers/file.logger.js +37 -3
- package/dist/lib/cjs/loggers/file.logger.js.map +1 -1
- package/dist/lib/cjs/loggers/loggers.js +1 -0
- package/dist/lib/cjs/loggers/loggers.js.map +1 -1
- package/dist/lib/cjs/logging.module.js +51 -1
- package/dist/lib/cjs/logging.module.js.map +1 -1
- package/dist/lib/cjs/models/diagnostics.model.js +7 -0
- package/dist/lib/cjs/models/diagnostics.model.js.map +1 -1
- package/dist/lib/cjs/models/log.model.js +15 -0
- package/dist/lib/cjs/models/log.model.js.map +1 -1
- package/dist/lib/cjs/utils/utils.js +36 -0
- package/dist/lib/cjs/utils/utils.js.map +1 -1
- package/dist/lib/esm/enums/output-mode.enum.js +9 -0
- package/dist/lib/esm/enums/output-mode.enum.js.map +1 -1
- package/dist/lib/esm/enums/severity.enum.js +3 -0
- package/dist/lib/esm/enums/severity.enum.js.map +1 -1
- package/dist/lib/esm/handlers/log.handler.js +66 -10
- package/dist/lib/esm/handlers/log.handler.js.map +1 -1
- package/dist/lib/esm/loggers/base.logger.js +62 -1
- package/dist/lib/esm/loggers/base.logger.js.map +1 -1
- package/dist/lib/esm/loggers/console.logger.js +35 -3
- package/dist/lib/esm/loggers/console.logger.js.map +1 -1
- package/dist/lib/esm/loggers/file.logger.js +37 -3
- package/dist/lib/esm/loggers/file.logger.js.map +1 -1
- package/dist/lib/esm/loggers/loggers.js +1 -0
- package/dist/lib/esm/loggers/loggers.js.map +1 -1
- package/dist/lib/esm/logging.module.js +51 -1
- package/dist/lib/esm/logging.module.js.map +1 -1
- package/dist/lib/esm/models/diagnostics.model.js +7 -0
- package/dist/lib/esm/models/diagnostics.model.js.map +1 -1
- package/dist/lib/esm/models/log.model.js +15 -0
- package/dist/lib/esm/models/log.model.js.map +1 -1
- package/dist/lib/esm/utils/utils.js +36 -0
- package/dist/lib/esm/utils/utils.js.map +1 -1
- package/dist/types/enums/output-mode.enum.d.ts +9 -0
- package/dist/types/enums/severity.enum.d.ts +3 -0
- package/dist/types/handlers/log.handler.d.ts +58 -3
- package/dist/types/interfaces/log-handler.interface.d.ts +37 -3
- package/dist/types/interfaces/logger.interface.d.ts +11 -0
- package/dist/types/loggers/base.logger.d.ts +71 -1
- package/dist/types/loggers/console.logger.d.ts +36 -1
- package/dist/types/loggers/file.logger.d.ts +42 -1
- package/dist/types/loggers/loggers.d.ts +1 -0
- package/dist/types/logging.module.d.ts +1 -1
- package/dist/types/models/diagnostics.model.d.ts +37 -0
- package/dist/types/models/log.model.d.ts +25 -1
- package/dist/types/utils/utils.d.ts +36 -0
- package/package.json +4 -4
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DiagnosticsModel = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The diagnostic model represents detailed information to help debug that will be outputted in the extras of the log
|
|
6
|
+
* when diagnostic is enabled.
|
|
7
|
+
*/
|
|
4
8
|
class DiagnosticsModel {
|
|
5
9
|
constructor() {
|
|
10
|
+
/**
|
|
11
|
+
* An array representing the stack trace from which the log originated.
|
|
12
|
+
*/
|
|
6
13
|
this.stackTrace = [];
|
|
7
14
|
}
|
|
8
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.model.js","sourceRoot":"","sources":["../../../../src/models/diagnostics.model.ts"],"names":[],"mappings":";;;AAAA,MAAa,gBAAgB;IAA7B;
|
|
1
|
+
{"version":3,"file":"diagnostics.model.js","sourceRoot":"","sources":["../../../../src/models/diagnostics.model.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAa,gBAAgB;IAA7B;QAOI;;WAEG;QACH,eAAU,GAoBJ,EAAE,CAAC;IA0Bb,CAAC;CAAA;AAxDD,4CAwDC"}
|
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LogModel = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The model that represents a log
|
|
6
|
+
*/
|
|
4
7
|
class LogModel {
|
|
8
|
+
/**
|
|
9
|
+
* The model that represents a log
|
|
10
|
+
* @param severity The log severity.
|
|
11
|
+
* @param message The actual log message that needs to be outputted.
|
|
12
|
+
*/
|
|
5
13
|
constructor(severity, message) {
|
|
6
14
|
this.severity = severity;
|
|
7
15
|
this.message = message;
|
|
16
|
+
/**
|
|
17
|
+
* The date at which the log was created.
|
|
18
|
+
*/
|
|
8
19
|
this.date = new Date();
|
|
20
|
+
/**
|
|
21
|
+
* The module from which the log originated.
|
|
22
|
+
* By default it will be the application module.
|
|
23
|
+
*/
|
|
9
24
|
this.module = "application";
|
|
10
25
|
}
|
|
11
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.model.js","sourceRoot":"","sources":["../../../../src/models/log.model.ts"],"names":[],"mappings":";;;AAEA,MAAa,QAAQ;
|
|
1
|
+
{"version":3,"file":"log.model.js","sourceRoot":"","sources":["../../../../src/models/log.model.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,QAAQ;IA2BnB;;;;OAIG;IACH,YAAmB,QAAsB,EAAS,OAAe;QAA9C,aAAQ,GAAR,QAAQ,CAAc;QAAS,YAAO,GAAP,OAAO,CAAQ;QArBjE;;WAEG;QACH,SAAI,GAAS,IAAI,IAAI,EAAE,CAAC;QAExB;;;WAGG;QACH,WAAM,GAAW,aAAa,CAAC;IAa/B,CAAC;CAEF;AAnCD,4BAmCC"}
|
|
@@ -8,13 +8,28 @@ const output_mode_enum_1 = require("../enums/output-mode.enum");
|
|
|
8
8
|
const severity_enum_1 = require("../enums/severity.enum");
|
|
9
9
|
const format_1 = __importDefault(require("date-fns/format"));
|
|
10
10
|
const diagnostics_model_1 = require("../models/diagnostics.model");
|
|
11
|
+
/**
|
|
12
|
+
* This class provides some utility functions to help with the logging.
|
|
13
|
+
*/
|
|
11
14
|
class Utils {
|
|
15
|
+
/**
|
|
16
|
+
* Returns whether or not the value is defined
|
|
17
|
+
* @param val
|
|
18
|
+
*/
|
|
12
19
|
static isDefined(val) {
|
|
13
20
|
return val !== null && val !== undefined;
|
|
14
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns whether or not the value is flat, meaning it is not an object.
|
|
24
|
+
* @param val
|
|
25
|
+
*/
|
|
15
26
|
static isFlat(val) {
|
|
16
27
|
return !this.isDefined(val) || ~this.flatTypes.indexOf(val.constructor);
|
|
17
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Gets the deep keys of an object.
|
|
31
|
+
* @param obj The object.
|
|
32
|
+
*/
|
|
18
33
|
static getDeepKeys(obj) {
|
|
19
34
|
let subkeys;
|
|
20
35
|
let keys = [];
|
|
@@ -33,6 +48,12 @@ class Utils {
|
|
|
33
48
|
}
|
|
34
49
|
return keys;
|
|
35
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* This function truncates an object to the max depth required.
|
|
53
|
+
* @param object The object to truncate.
|
|
54
|
+
* @param maxDepth The max depth of the object.
|
|
55
|
+
* @param curDepth The current depth at which we are at.
|
|
56
|
+
*/
|
|
36
57
|
static truncate(object, maxDepth, curDepth = 0) {
|
|
37
58
|
if (curDepth < maxDepth) {
|
|
38
59
|
const newDepth = curDepth + 1;
|
|
@@ -66,6 +87,10 @@ class Utils {
|
|
|
66
87
|
}
|
|
67
88
|
return;
|
|
68
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Gets the string representing a value of the log severity enum.
|
|
92
|
+
* @param logSeverity The log severity for which to get the string representation.
|
|
93
|
+
*/
|
|
69
94
|
static getSeverityText(logSeverity) {
|
|
70
95
|
switch (logSeverity) {
|
|
71
96
|
case severity_enum_1.SeverityEnum.Debug:
|
|
@@ -80,6 +105,13 @@ class Utils {
|
|
|
80
105
|
return "CRITICAL";
|
|
81
106
|
}
|
|
82
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Returns the string formatted log based on the output model.
|
|
110
|
+
* @param log The log to be string formatted.
|
|
111
|
+
* @param outputMode The output mode desired.
|
|
112
|
+
* @param logDepth The log depth.
|
|
113
|
+
* @param spaceNumber The number of spaces for a tab.
|
|
114
|
+
*/
|
|
83
115
|
static outputLog(log, outputMode, logDepth, spaceNumber = 0) {
|
|
84
116
|
const jsonSortOrders = ["severity", "message", "date", "module", "traceId", "kernelInstantiationId"];
|
|
85
117
|
switch (outputMode) {
|
|
@@ -93,6 +125,10 @@ class Utils {
|
|
|
93
125
|
return format_1.default(log.date, "yyyy-MM-dd HH:mm:ss") + " - " + " [" + this.getSeverityText(log.severity) + "] - " + log.message + " - " + JSON.stringify(Utils.truncate(log.extra, 2));
|
|
94
126
|
}
|
|
95
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Creates the diagnostic model from an error object to attach to a log.
|
|
130
|
+
* @param error The error object from which to get the stack trace.
|
|
131
|
+
*/
|
|
96
132
|
static getDiagnostics(error) {
|
|
97
133
|
const diagnostics = new diagnostics_model_1.DiagnosticsModel();
|
|
98
134
|
const errorStack = error.stack;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/utils/utils.ts"],"names":[],"mappings":";;;;;;AAC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WAAW,CAAC,cAAc,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;SAC1D;QAED,OAAO,WAAW,CAAC;IACvB,CAAC;;AArKL,sBAsKC;AApKU,eAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Output mode for the logs.
|
|
3
|
+
*/
|
|
1
4
|
export var OutputModeEnum;
|
|
2
5
|
(function (OutputModeEnum) {
|
|
6
|
+
/**
|
|
7
|
+
* The logs will output a JSON format.
|
|
8
|
+
*/
|
|
3
9
|
OutputModeEnum["Json"] = "JSON";
|
|
10
|
+
/**
|
|
11
|
+
* The logs will output a simple string format.
|
|
12
|
+
*/
|
|
4
13
|
OutputModeEnum["Simple"] = "SIMPLE";
|
|
5
14
|
})(OutputModeEnum || (OutputModeEnum = {}));
|
|
6
15
|
//# sourceMappingURL=output-mode.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-mode.enum.js","sourceRoot":"","sources":["../../../../src/enums/output-mode.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"output-mode.enum.js","sourceRoot":"","sources":["../../../../src/enums/output-mode.enum.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACtB;;OAEG;IACH,+BAAa,CAAA;IACb;;OAEG;IACH,mCAAiB,CAAA;AACrB,CAAC,EATW,cAAc,KAAd,cAAc,QASzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"severity.enum.js","sourceRoot":"","sources":["../../../../src/enums/severity.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACpB,uDAAY,CAAA;IACZ,iDAAS,CAAA;IACT,qDAAW,CAAA;IACX,+CAAQ,CAAA;IACR,iDAAS,CAAA;AACb,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB"}
|
|
1
|
+
{"version":3,"file":"severity.enum.js","sourceRoot":"","sources":["../../../../src/enums/severity.enum.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACpB,uDAAY,CAAA;IACZ,iDAAS,CAAA;IACT,qDAAW,CAAA;IACX,+CAAQ,CAAA;IACR,iDAAS,CAAA;AACb,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB"}
|
|
@@ -16,7 +16,20 @@ import { SeverityEnum } from "../enums/severity.enum";
|
|
|
16
16
|
import { LogModel } from "../models/log.model";
|
|
17
17
|
import { ServiceDefinitionTagEnum, tag, TracingContext, InternalContainerParameterEnum } from "@pristine-ts/common";
|
|
18
18
|
import { Utils } from "../utils/utils";
|
|
19
|
+
/**
|
|
20
|
+
* The LogHandler to use when we want to output some logs.
|
|
21
|
+
* This handler makes sure that only the right level of logs are outputted, stacks logs, and logs with different loggers.
|
|
22
|
+
* It is registered with the tag LogHandlerInterface so that it can be injected as a LogHandlerInterface to facilitate mocking.
|
|
23
|
+
*/
|
|
19
24
|
let LogHandler = class LogHandler {
|
|
25
|
+
/**
|
|
26
|
+
* The LogHandler to use when we want to output some logs.
|
|
27
|
+
* @param loggers The loggers to use to output the logs. All services with the tag ServiceDefinitionTagEnum.Logger will be automatically injected here.
|
|
28
|
+
* @param logSeverityLevelConfiguration The severity from which to start logging the logs.
|
|
29
|
+
* @param activateDiagnostics Whether or not the outputted logs should contain the diagnostic part. This is an intensive process and can dramatically reduce the performance of the code.
|
|
30
|
+
* @param kernelInstantiationId The id of instantiation of the kernel.
|
|
31
|
+
* @param tracingContext The context of the tracing.
|
|
32
|
+
*/
|
|
20
33
|
constructor(loggers, logSeverityLevelConfiguration, activateDiagnostics, kernelInstantiationId, tracingContext) {
|
|
21
34
|
this.loggers = loggers;
|
|
22
35
|
this.logSeverityLevelConfiguration = logSeverityLevelConfiguration;
|
|
@@ -24,21 +37,63 @@ let LogHandler = class LogHandler {
|
|
|
24
37
|
this.kernelInstantiationId = kernelInstantiationId;
|
|
25
38
|
this.tracingContext = tracingContext;
|
|
26
39
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Logs the message if the severity is set to critical or above.
|
|
42
|
+
* This function is wrapper function for the log method with the proper severity to make it cleaner when using it in the code.
|
|
43
|
+
* @param message The message to log.
|
|
44
|
+
* @param extra The extra object to log.
|
|
45
|
+
* @param module The module from where the log was created.
|
|
46
|
+
*/
|
|
30
47
|
critical(message, extra, module = "application") {
|
|
31
48
|
return this.log(message, SeverityEnum.Critical, extra, module);
|
|
32
49
|
}
|
|
33
|
-
|
|
34
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Logs the message if the severity is set to error or above.
|
|
52
|
+
* This function is wrapper function for the log method with the proper severity to make it cleaner when using it in the code.
|
|
53
|
+
* @param message The message to log.
|
|
54
|
+
* @param extra The extra object to log.
|
|
55
|
+
* @param module The module from where the log was created.
|
|
56
|
+
*/
|
|
57
|
+
error(message, extra, module = "application") {
|
|
58
|
+
return this.log(message, SeverityEnum.Error, extra, module);
|
|
35
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Logs the message if the severity is set to warning or above.
|
|
62
|
+
* This function is wrapper function for the log method with the proper severity to make it cleaner when using it in the code.
|
|
63
|
+
* @param message The message to log.
|
|
64
|
+
* @param extra The extra object to log.
|
|
65
|
+
* @param module The module from where the log was created.
|
|
66
|
+
*/
|
|
67
|
+
warning(message, extra, module = "application") {
|
|
68
|
+
return this.log(message, SeverityEnum.Warning, extra, module);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Logs the message if the severity is set to info or above.
|
|
72
|
+
* This function is wrapper function for the log method with the proper severity to make it cleaner when using it in the code.
|
|
73
|
+
* @param message The message to log.
|
|
74
|
+
* @param extra The extra object to log.
|
|
75
|
+
* @param module The module from where the log was created.
|
|
76
|
+
*/
|
|
36
77
|
info(message, extra, module = "application") {
|
|
37
78
|
return this.log(message, SeverityEnum.Info, extra, module);
|
|
38
79
|
}
|
|
39
|
-
|
|
40
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Logs the message if the severity is set to debug or above.
|
|
82
|
+
* This function is wrapper function for the log method with the proper severity to make it cleaner when using it in the code.
|
|
83
|
+
* @param message The message to log.
|
|
84
|
+
* @param extra The extra object to log.
|
|
85
|
+
* @param module The module from where the log was created.
|
|
86
|
+
*/
|
|
87
|
+
debug(message, extra, module = "application") {
|
|
88
|
+
return this.log(message, SeverityEnum.Debug, extra, module);
|
|
41
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Logs the message based on the severity.
|
|
92
|
+
* @param message The message to log.
|
|
93
|
+
* @param severity The minimum severity to log.
|
|
94
|
+
* @param extra The extra object to log.
|
|
95
|
+
* @param module The module from where the log was created.
|
|
96
|
+
*/
|
|
42
97
|
log(message, severity = SeverityEnum.Error, extra, module = "application") {
|
|
43
98
|
const log = new LogModel(severity, message);
|
|
44
99
|
log.kernelInstantiationId = this.kernelInstantiationId;
|
|
@@ -61,9 +116,10 @@ let LogHandler = class LogHandler {
|
|
|
61
116
|
}
|
|
62
117
|
log.extra["__diagnostics"] = diagnostics;
|
|
63
118
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
119
|
+
// Log in every logger that is activated.
|
|
120
|
+
for (const logger of this.loggers) {
|
|
121
|
+
if (logger.isActive()) {
|
|
122
|
+
logger.readableStream.push(log);
|
|
67
123
|
}
|
|
68
124
|
}
|
|
69
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.handler.js","sourceRoot":"","sources":["../../../../src/handlers/log.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,kBAAkB,CAAA;AACzB,OAAO,EAAC,UAAU,EAAE,SAAS,EAAa,MAAM,EAAC,MAAM,UAAU,C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mB,EAAE;YAC3B,MAAM,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;YAEtD,mHAAmH;YACnH,yCAAyC;YACzC,KAAK,MAAM,UAAU,IAAI,WAAW,CAAC,UAAU,EAAE;gBAC/C,IAAG,UAAU,CAAC,SAAS,KAAK,SAAS,IAAI,UAAU,CAAC,SAAS,KAAK,EAAE,IAAI,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;oBACjK,SAAS;iBACV;gBAED,WAAW,CAAC,cAAc,GAAG,UAAU,CAAC;gBACxC,MAAM;aACP;YAED,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,WAAW,CAAC;SAC1C;QAED,yCAAyC;QACzC,KAAI,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAC;YAC/B,IAAG,MAAM,CAAC,QAAQ,EAAE,EAAE;gBACpB,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACjC;SACF;IACH,CAAC;CACF,CAAA;AAjHY,UAAU;IAFtB,GAAG,CAAC,qBAAqB,CAAC;IAC1B,UAAU,EAAE;IAWS,WAAA,SAAS,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAA;IAC1C,WAAA,MAAM,CAAC,kDAAkD,CAAC,CAAA;IAC1D,WAAA,MAAM,CAAC,wCAAwC,CAAC,CAAA;IAChD,WAAA,MAAM,CAAC,8BAA8B,CAAC,qBAAqB,CAAC,CAAA;qEAC5B,cAAc;GAdvD,UAAU,CAiHtB;SAjHY,UAAU"}
|
|
@@ -2,7 +2,32 @@ import { SeverityEnum } from "../enums/severity.enum";
|
|
|
2
2
|
import { Utils } from "../utils/utils";
|
|
3
3
|
import { CommonModuleKeyname } from "@pristine-ts/common";
|
|
4
4
|
import { OutputModeEnum } from "../enums/output-mode.enum";
|
|
5
|
+
/**
|
|
6
|
+
* The BaseLogger is the base abstract class that all internal loggers should extend.
|
|
7
|
+
* It defines the basic logic that applies to all internal loggers.
|
|
8
|
+
* External loggers could extend the base logger but it is not mandatory.
|
|
9
|
+
*/
|
|
5
10
|
export class BaseLogger {
|
|
11
|
+
/**
|
|
12
|
+
* The BaseLogger is the base abstract class that all loggers should extend.
|
|
13
|
+
* It defines the basic logic that applies to all loggers.
|
|
14
|
+
* @param numberOfStackedLogs The number of logs to keep in the stack and to print once a log with a high enough severity arrives.
|
|
15
|
+
* @param logSeverityLevelConfiguration The number representing the severity from which logs should be outputted.
|
|
16
|
+
* For example, if this is set to 3, any log that has a severity of Error(3) or critical(4) will be outputted.
|
|
17
|
+
* @param logDebugDepthConfiguration The number of level to go down in an object when printing a log with the Debug severity.
|
|
18
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
19
|
+
* @param logInfoDepthConfiguration The number of level to go down in an object when printing a log with the Info severity.
|
|
20
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
21
|
+
* @param logWarningDepthConfiguration The number of level to go down in an object when printing a log with the Warning severity.
|
|
22
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
23
|
+
* @param logErrorDepthConfiguration The number of level to go down in an object when printing a log with the Error severity.
|
|
24
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
25
|
+
* @param logCriticalDepthConfiguration The number of level to go down in an object when printing a log with the Critical severity.
|
|
26
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
27
|
+
* @param isActivated Whether or not this particular logger is activated and should output logs.
|
|
28
|
+
* @param outputMode The output mode, that the logger should use.
|
|
29
|
+
* @param spaces The number of spaces to indent the outputted logs.
|
|
30
|
+
*/
|
|
6
31
|
constructor(numberOfStackedLogs, logSeverityLevelConfiguration, logDebugDepthConfiguration, logInfoDepthConfiguration, logWarningDepthConfiguration, logErrorDepthConfiguration, logCriticalDepthConfiguration, isActivated = true, outputMode = OutputModeEnum.Json, spaces = 2) {
|
|
7
32
|
this.numberOfStackedLogs = numberOfStackedLogs;
|
|
8
33
|
this.logSeverityLevelConfiguration = logSeverityLevelConfiguration;
|
|
@@ -14,12 +39,23 @@ export class BaseLogger {
|
|
|
14
39
|
this.isActivated = isActivated;
|
|
15
40
|
this.outputMode = outputMode;
|
|
16
41
|
this.spaces = spaces;
|
|
42
|
+
/**
|
|
43
|
+
* The stacked logs are the logs that were not outputted right away but that will need to be outputted if a log with a higher severity arrives.
|
|
44
|
+
* @private
|
|
45
|
+
*/
|
|
17
46
|
this.stackedLogs = {};
|
|
18
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Returns whether this particular logger is active and should output logs.
|
|
50
|
+
*/
|
|
19
51
|
isActive() {
|
|
20
52
|
return this.isActivated;
|
|
21
53
|
}
|
|
22
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Gets the formatted output log based on a log model.
|
|
56
|
+
* @param log The log to be formatted.
|
|
57
|
+
*/
|
|
58
|
+
getFormattedOutputLog(log) {
|
|
23
59
|
switch (log.severity) {
|
|
24
60
|
case SeverityEnum.Debug:
|
|
25
61
|
return Utils.outputLog(log, this.outputMode, this.logDebugDepthConfiguration);
|
|
@@ -33,6 +69,11 @@ export class BaseLogger {
|
|
|
33
69
|
return Utils.outputLog(log, this.outputMode, this.logCriticalDepthConfiguration);
|
|
34
70
|
}
|
|
35
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Captures the log and evaluates which logs need to be outputted or stacked.
|
|
74
|
+
* @param log The log to be captured.
|
|
75
|
+
* @protected
|
|
76
|
+
*/
|
|
36
77
|
captureLog(log) {
|
|
37
78
|
if (this.numberOfStackedLogs > 0) {
|
|
38
79
|
this.setupStackedLogsArrayIfRequired(log.traceId);
|
|
@@ -47,6 +88,11 @@ export class BaseLogger {
|
|
|
47
88
|
this.log(log);
|
|
48
89
|
}
|
|
49
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Sets up the stack of logs if it is required.
|
|
93
|
+
* @param traceId Optional trace id to stack logs based on different requests.
|
|
94
|
+
* @private
|
|
95
|
+
*/
|
|
50
96
|
setupStackedLogsArrayIfRequired(traceId) {
|
|
51
97
|
var _a;
|
|
52
98
|
if (this.stackedLogs.hasOwnProperty(CommonModuleKeyname) === false) {
|
|
@@ -56,6 +102,11 @@ export class BaseLogger {
|
|
|
56
102
|
this.stackedLogs[traceId] = (_a = this.stackedLogs[CommonModuleKeyname]) !== null && _a !== void 0 ? _a : [];
|
|
57
103
|
}
|
|
58
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Adds the log to the stacked logs and makes sure we only keep the right amount of stacked logs.
|
|
107
|
+
* @param log The log to be added.
|
|
108
|
+
* @private
|
|
109
|
+
*/
|
|
59
110
|
addStackedLog(log) {
|
|
60
111
|
var _a;
|
|
61
112
|
const stackedLogsKey = (_a = log.traceId) !== null && _a !== void 0 ? _a : CommonModuleKeyname;
|
|
@@ -68,6 +119,11 @@ export class BaseLogger {
|
|
|
68
119
|
} while (this.stackedLogs[stackedLogsKey].length > this.numberOfStackedLogs);
|
|
69
120
|
}
|
|
70
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Outputs the stacked logs.
|
|
124
|
+
* @param traceId Optional trace id so that we only output the stacked logs for this trace.
|
|
125
|
+
* @private
|
|
126
|
+
*/
|
|
71
127
|
outputStackedLogs(traceId) {
|
|
72
128
|
for (const log of this.stackedLogs[CommonModuleKeyname]) {
|
|
73
129
|
this.log(log);
|
|
@@ -80,6 +136,11 @@ export class BaseLogger {
|
|
|
80
136
|
}
|
|
81
137
|
this.clearStackedLogs(traceId);
|
|
82
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* Clears the stacked logs.
|
|
141
|
+
* @param traceId Optional trace id so that we only remove the stacked logs for this trace.
|
|
142
|
+
* @private
|
|
143
|
+
*/
|
|
83
144
|
clearStackedLogs(traceId) {
|
|
84
145
|
this.stackedLogs[CommonModuleKeyname] = [];
|
|
85
146
|
if (traceId === undefined || this.stackedLogs.hasOwnProperty(traceId) === false) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.logger.js","sourceRoot":"","sources":["../../../../src/loggers/base.logger.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"base.logger.js","sourceRoot":"","sources":["../../../../src/loggers/base.logger.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAEzD;;;;GAIG;AACH,MAAM,OAAgB,UAAU;IAQ5B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,YACuB,mBAA2B,EAC3B,6BAAqC,EACrC,0BAAkC,EAClC,yBAAiC,EACjC,4BAAoC,EACpC,0BAAkC,EAClC,6BAAqC,EACvC,cAAc,IAAI,EAChB,aAAa,cAAc,CAAC,IAAI,EAChC,SAAS,CAAC;QATV,wBAAmB,GAAnB,mBAAmB,CAAQ;QAC3B,kCAA6B,GAA7B,6BAA6B,CAAQ;QACrC,+BAA0B,GAA1B,0BAA0B,CAAQ;QAClC,8BAAyB,GAAzB,yBAAyB,CAAQ;QACjC,iCAA4B,GAA5B,4BAA4B,CAAQ;QACpC,+BAA0B,GAA1B,0BAA0B,CAAQ;QAClC,kCAA6B,GAA7B,6BAA6B,CAAQ;QACvC,gBAAW,GAAX,WAAW,CAAO;QAChB,eAAU,GAAV,UAAU,CAAsB;QAChC,WAAM,GAAN,MAAM,CAAI;QApCjC;;;WAGG;QAC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OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,KAAK,EAAE;YAC7E,OAAO;SACV;QAED,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;YACzC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;SACjB;QAED,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACK,gBAAgB,CAAC,OAAgB;QACrC,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC;QAE3C,IAAI,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,KAAK,EAAE;YAC7E,OAAO;SACV;QAED,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IACnC,CAAC;CACJ"}
|
|
@@ -17,11 +17,38 @@ import { moduleScoped, ServiceDefinitionTagEnum, tag } from "@pristine-ts/common
|
|
|
17
17
|
import { OutputModeEnum } from "../enums/output-mode.enum";
|
|
18
18
|
import { LoggingModuleKeyname } from "../logging.module.keyname";
|
|
19
19
|
import { BaseLogger } from "./base.logger";
|
|
20
|
+
/**
|
|
21
|
+
* The ConsoleLogger outputs the logs in the console.
|
|
22
|
+
* It is registered with the tag Logger so that it can be injected along with all the other Loggers.
|
|
23
|
+
* It is module scoped to the logging module so that it is only registered if the logging module is imported.
|
|
24
|
+
*/
|
|
20
25
|
let ConsoleLogger = class ConsoleLogger extends BaseLogger {
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The ConsoleLogger outputs the logs in the console.
|
|
28
|
+
* @param numberOfStackedLogs The number of logs to keep in the stack and to print once a log with a high enough severity arrives.
|
|
29
|
+
* @param logSeverityLevelConfiguration The number representing the severity from which logs should be outputted.
|
|
30
|
+
* For example, if this is set to 3, any log that has a severity of Error(3) or critical(4) will be outputted.
|
|
31
|
+
* @param logDebugDepthConfiguration The number of level to go down in an object when printing a log with the Debug severity.
|
|
32
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
33
|
+
* @param logInfoDepthConfiguration The number of level to go down in an object when printing a log with the Info severity.
|
|
34
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
35
|
+
* @param logWarningDepthConfiguration The number of level to go down in an object when printing a log with the Warning severity.
|
|
36
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
37
|
+
* @param logErrorDepthConfiguration The number of level to go down in an object when printing a log with the Error severity.
|
|
38
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
39
|
+
* @param logCriticalDepthConfiguration The number of level to go down in an object when printing a log with the Critical severity.
|
|
40
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
41
|
+
* @param isActivated Whether or not this particular logger is activated and should output logs.
|
|
42
|
+
* @param outputMode The output mode, that the logger should use.
|
|
43
|
+
*/
|
|
44
|
+
constructor(numberOfStackedLogs, logSeverityLevelConfiguration, logDebugDepthConfiguration, logInfoDepthConfiguration, logWarningDepthConfiguration, logErrorDepthConfiguration, logCriticalDepthConfiguration, isActivated, outputMode) {
|
|
45
|
+
super(numberOfStackedLogs, logSeverityLevelConfiguration, logDebugDepthConfiguration, logInfoDepthConfiguration, logWarningDepthConfiguration, logErrorDepthConfiguration, logCriticalDepthConfiguration, isActivated, outputMode);
|
|
23
46
|
this.initialize();
|
|
24
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Initializes the console logger.
|
|
50
|
+
* @protected
|
|
51
|
+
*/
|
|
25
52
|
initialize() {
|
|
26
53
|
if (this.isActive()) {
|
|
27
54
|
this.readableStream = new Readable({
|
|
@@ -35,8 +62,13 @@ let ConsoleLogger = class ConsoleLogger extends BaseLogger {
|
|
|
35
62
|
});
|
|
36
63
|
}
|
|
37
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Outputs the log in the console.
|
|
67
|
+
* @param log The log to be outputted
|
|
68
|
+
* @protected
|
|
69
|
+
*/
|
|
38
70
|
log(log) {
|
|
39
|
-
const outputLog = this.
|
|
71
|
+
const outputLog = this.getFormattedOutputLog(log);
|
|
40
72
|
switch (log.severity) {
|
|
41
73
|
case SeverityEnum.Debug:
|
|
42
74
|
console.debug(outputLog);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.logger.js","sourceRoot":"","sources":["../../../../src/loggers/console.logger.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAGpD,OAAO,EAAC,QAAQ,EAAC,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAsB,YAAY,EAAE,wBAAwB,EAAE,GAAG,EAAC,MAAM,qBAAqB,CAAC;AACrG,OAAO,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"console.logger.js","sourceRoot":"","sources":["../../../../src/loggers/console.logger.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAGpD,OAAO,EAAC,QAAQ,EAAC,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAsB,YAAY,EAAE,wBAAwB,EAAE,GAAG,EAAC,MAAM,qBAAqB,CAAC;AACrG,OAAO,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAC,oBAAoB,EAAC,MA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AAY,CAAC,OAAO;gBACvB,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBACxB,MAAM;YAER,KAAK,YAAY,CAAC,KAAK;gBACrB,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBACzB,MAAM;YAER,KAAK,YAAY,CAAC,QAAQ;gBACxB,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBACzB,MAAM;SACT;IACH,CAAC;CACF,CAAA;AAhGY,aAAa;IAJzB,YAAY,CAAC,oBAAoB,CAAC;IAClC,SAAS,EAAE;IACX,GAAG,CAAC,wBAAwB,CAAC,MAAM,CAAC;IACpC,UAAU,EAAE;IA0BS,WAAA,MAAM,CAAC,wCAAwC,CAAC,CAAA;IAChD,WAAA,MAAM,CAAC,kDAAkD,CAAC,CAAA;IAC1D,WAAA,MAAM,CAAC,+CAA+C,CAAC,CAAA;IACvD,WAAA,MAAM,CAAC,8CAA8C,CAAC,CAAA;IACtD,WAAA,MAAM,CAAC,iDAAiD,CAAC,CAAA;IACzD,WAAA,MAAM,CAAC,+CAA+C,CAAC,CAAA;IACvD,WAAA,MAAM,CAAC,kDAAkD,CAAC,CAAA;IAC1D,WAAA,MAAM,CAAC,2CAA2C,CAAC,CAAA;IACnD,WAAA,MAAM,CAAC,4CAA4C,CAAC,CAAA;;GAjC7D,aAAa,CAgGzB;SAhGY,aAAa"}
|
|
@@ -18,12 +18,41 @@ import fs from 'fs';
|
|
|
18
18
|
import { LoggingModuleKeyname } from "../logging.module.keyname";
|
|
19
19
|
import { OutputModeEnum } from "../enums/output-mode.enum";
|
|
20
20
|
import { BaseLogger } from "./base.logger";
|
|
21
|
+
/**
|
|
22
|
+
* The FileLogger outputs the logs into file.
|
|
23
|
+
* It is registered with the tag Logger so that it can be injected along with all the other Loggers.
|
|
24
|
+
* It is module scoped to the logging module so that it is only registered if the logging module is imported.
|
|
25
|
+
*/
|
|
21
26
|
let FileLogger = class FileLogger extends BaseLogger {
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
/**
|
|
28
|
+
* The ConsoleLogger outputs the logs in the console.
|
|
29
|
+
* @param numberOfStackedLogs The number of logs to keep in the stack and to print once a log with a high enough severity arrives.
|
|
30
|
+
* @param logSeverityLevelConfiguration The number representing the severity from which logs should be outputted.
|
|
31
|
+
* For example, if this is set to 3, any log that has a severity of Error(3) or critical(4) will be outputted.
|
|
32
|
+
* @param logDebugDepthConfiguration The number of level to go down in an object when printing a log with the Debug severity.
|
|
33
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
34
|
+
* @param logInfoDepthConfiguration The number of level to go down in an object when printing a log with the Info severity.
|
|
35
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
36
|
+
* @param logWarningDepthConfiguration The number of level to go down in an object when printing a log with the Warning severity.
|
|
37
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
38
|
+
* @param logErrorDepthConfiguration The number of level to go down in an object when printing a log with the Error severity.
|
|
39
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
40
|
+
* @param logCriticalDepthConfiguration The number of level to go down in an object when printing a log with the Critical severity.
|
|
41
|
+
* We often do not need to go to the bottom layer of an object, so we can truncate at a certain depth.
|
|
42
|
+
* @param isActivated Whether or not this particular logger is activated and should output logs.
|
|
43
|
+
* @param outputMode The output mode, that the logger should use.
|
|
44
|
+
* @param fileLoggerPretty Whether or not the file logger should prettify the output.
|
|
45
|
+
* @param filePath The file path where to output the log.
|
|
46
|
+
*/
|
|
47
|
+
constructor(numberOfStackedLogs, logSeverityLevelConfiguration, logDebugDepthConfiguration, logInfoDepthConfiguration, logWarningDepthConfiguration, logErrorDepthConfiguration, logCriticalDepthConfiguration, isActivated, outputMode, fileLoggerPretty, filePath) {
|
|
48
|
+
super(numberOfStackedLogs, logSeverityLevelConfiguration, logDebugDepthConfiguration, logInfoDepthConfiguration, logWarningDepthConfiguration, logErrorDepthConfiguration, logCriticalDepthConfiguration, isActivated, outputMode, fileLoggerPretty ? 2 : 0);
|
|
24
49
|
this.filePath = filePath;
|
|
25
50
|
this.initialize();
|
|
26
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Initializes the file logger, and opens the write stream.
|
|
54
|
+
* @protected
|
|
55
|
+
*/
|
|
27
56
|
initialize() {
|
|
28
57
|
if (this.isActive()) {
|
|
29
58
|
this.readableStream = new Readable({
|
|
@@ -38,8 +67,13 @@ let FileLogger = class FileLogger extends BaseLogger {
|
|
|
38
67
|
});
|
|
39
68
|
}
|
|
40
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Outputs the log in the file.
|
|
72
|
+
* @param log The log to be outputted
|
|
73
|
+
* @protected
|
|
74
|
+
*/
|
|
41
75
|
log(log) {
|
|
42
|
-
const outputLog = this.
|
|
76
|
+
const outputLog = this.getFormattedOutputLog(log) + ";\n";
|
|
43
77
|
switch (log.severity) {
|
|
44
78
|
case SeverityEnum.Debug:
|
|
45
79
|
this.writableStream.write(outputLog);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.logger.js","sourceRoot":"","sources":["../../../../src/loggers/file.logger.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAGpD,OAAO,EAAC,QAAQ,EAAW,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,GAAG,EAAC,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"file.logger.js","s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;IAC1D,WAAA,MAAM,CAAC,+CAA+C,CAAC,CAAA;IACvD,WAAA,MAAM,CAAC,8CAA8C,CAAC,CAAA;IACtD,WAAA,MAAM,CAAC,iDAAiD,CAAC,CAAA;IACzD,WAAA,MAAM,CAAC,+CAA+C,CAAC,CAAA;IACvD,WAAA,MAAM,CAAC,kDAAkD,CAAC,CAAA;IAC1D,WAAA,MAAM,CAAC,wCAAwC,CAAC,CAAA;IAChD,WAAA,MAAM,CAAC,yCAAyC,CAAC,CAAA;IACjD,WAAA,MAAM,CAAC,qCAAqC,CAAC,CAAA;IAC7C,YAAA,MAAM,CAAC,6BAA6B,CAAC,CAAA;;GA3C9C,UAAU,CA4GtB;SA5GY,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loggers.js","sourceRoot":"","sources":["../../../../src/loggers/loggers.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"loggers.js","sourceRoot":"","sources":["../../../../src/loggers/loggers.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
|