@lark-apaas/nestjs-logger 1.0.9-alpha.2 → 1.0.9-alpha.3
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/index.cjs +7 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -9
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -9286,11 +9286,9 @@ var BasePinoLogger = class _BasePinoLogger {
|
|
|
9286
9286
|
}
|
|
9287
9287
|
const pinoLevel = mapLogLevelToPino(level);
|
|
9288
9288
|
const sanitizedPayload = sanitizeValue(payload);
|
|
9289
|
-
const
|
|
9290
|
-
const platformModule = isTriggerLog ? "trigger" : firstParam?.paas_attributes_module;
|
|
9291
|
-
const parentSpan = firstParam?.paas_parent_span_context;
|
|
9289
|
+
const platformModule = firstParam?.paas_attributes_module;
|
|
9292
9290
|
if (process.env.NODE_ENV === "development") {
|
|
9293
|
-
if (platformModule &&
|
|
9291
|
+
if (platformModule && platformModule !== "trigger") {
|
|
9294
9292
|
return;
|
|
9295
9293
|
}
|
|
9296
9294
|
if (messageText) {
|
|
@@ -9307,13 +9305,13 @@ var BasePinoLogger = class _BasePinoLogger {
|
|
|
9307
9305
|
this.observableService.log(level, finalMessage ?? "", {
|
|
9308
9306
|
...payload,
|
|
9309
9307
|
module: platformModule
|
|
9310
|
-
}
|
|
9308
|
+
});
|
|
9311
9309
|
} else {
|
|
9312
9310
|
const reportMessage = this.processLogParams([
|
|
9313
9311
|
message,
|
|
9314
9312
|
...optionalParams
|
|
9315
9313
|
]);
|
|
9316
|
-
this.observableService.log(level, reportMessage, {}
|
|
9314
|
+
this.observableService.log(level, reportMessage, {});
|
|
9317
9315
|
}
|
|
9318
9316
|
}
|
|
9319
9317
|
}
|
|
@@ -9542,7 +9540,7 @@ var LoggingInterceptor = class {
|
|
|
9542
9540
|
method,
|
|
9543
9541
|
path
|
|
9544
9542
|
});
|
|
9545
|
-
const startedAt =
|
|
9543
|
+
const startedAt = Date.now();
|
|
9546
9544
|
const baseMeta = {
|
|
9547
9545
|
method,
|
|
9548
9546
|
path,
|
|
@@ -9583,7 +9581,7 @@ url=${req.url}`, "HTTPTraceInterceptor");
|
|
|
9583
9581
|
return;
|
|
9584
9582
|
}
|
|
9585
9583
|
logged = true;
|
|
9586
|
-
const durationMs =
|
|
9584
|
+
const durationMs = Date.now() - startedAt;
|
|
9587
9585
|
const statusCode = res.statusCode;
|
|
9588
9586
|
const responseMeta = {
|
|
9589
9587
|
...baseMeta,
|
|
@@ -9632,7 +9630,7 @@ duration_ms=${durationMs}`, "HTTPTraceInterceptor");
|
|
|
9632
9630
|
return next.handle().pipe((0, import_operators.tap)({
|
|
9633
9631
|
next: /* @__PURE__ */ __name((data) => {
|
|
9634
9632
|
const statusCode = res.statusCode;
|
|
9635
|
-
const durationMs =
|
|
9633
|
+
const durationMs = Date.now() - startedAt;
|
|
9636
9634
|
const isError = statusCode > 400;
|
|
9637
9635
|
const responseData = {
|
|
9638
9636
|
method,
|