@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.js
CHANGED
|
@@ -9269,11 +9269,9 @@ var BasePinoLogger = class _BasePinoLogger {
|
|
|
9269
9269
|
}
|
|
9270
9270
|
const pinoLevel = mapLogLevelToPino(level);
|
|
9271
9271
|
const sanitizedPayload = sanitizeValue(payload);
|
|
9272
|
-
const
|
|
9273
|
-
const platformModule = isTriggerLog ? "trigger" : firstParam?.paas_attributes_module;
|
|
9274
|
-
const parentSpan = firstParam?.paas_parent_span_context;
|
|
9272
|
+
const platformModule = firstParam?.paas_attributes_module;
|
|
9275
9273
|
if (process.env.NODE_ENV === "development") {
|
|
9276
|
-
if (platformModule &&
|
|
9274
|
+
if (platformModule && platformModule !== "trigger") {
|
|
9277
9275
|
return;
|
|
9278
9276
|
}
|
|
9279
9277
|
if (messageText) {
|
|
@@ -9290,13 +9288,13 @@ var BasePinoLogger = class _BasePinoLogger {
|
|
|
9290
9288
|
this.observableService.log(level, finalMessage ?? "", {
|
|
9291
9289
|
...payload,
|
|
9292
9290
|
module: platformModule
|
|
9293
|
-
}
|
|
9291
|
+
});
|
|
9294
9292
|
} else {
|
|
9295
9293
|
const reportMessage = this.processLogParams([
|
|
9296
9294
|
message,
|
|
9297
9295
|
...optionalParams
|
|
9298
9296
|
]);
|
|
9299
|
-
this.observableService.log(level, reportMessage, {}
|
|
9297
|
+
this.observableService.log(level, reportMessage, {});
|
|
9300
9298
|
}
|
|
9301
9299
|
}
|
|
9302
9300
|
}
|
|
@@ -9525,7 +9523,7 @@ var LoggingInterceptor = class {
|
|
|
9525
9523
|
method,
|
|
9526
9524
|
path
|
|
9527
9525
|
});
|
|
9528
|
-
const startedAt =
|
|
9526
|
+
const startedAt = Date.now();
|
|
9529
9527
|
const baseMeta = {
|
|
9530
9528
|
method,
|
|
9531
9529
|
path,
|
|
@@ -9566,7 +9564,7 @@ url=${req.url}`, "HTTPTraceInterceptor");
|
|
|
9566
9564
|
return;
|
|
9567
9565
|
}
|
|
9568
9566
|
logged = true;
|
|
9569
|
-
const durationMs =
|
|
9567
|
+
const durationMs = Date.now() - startedAt;
|
|
9570
9568
|
const statusCode = res.statusCode;
|
|
9571
9569
|
const responseMeta = {
|
|
9572
9570
|
...baseMeta,
|
|
@@ -9615,7 +9613,7 @@ duration_ms=${durationMs}`, "HTTPTraceInterceptor");
|
|
|
9615
9613
|
return next.handle().pipe((0, import_operators.tap)({
|
|
9616
9614
|
next: /* @__PURE__ */ __name((data) => {
|
|
9617
9615
|
const statusCode = res.statusCode;
|
|
9618
|
-
const durationMs =
|
|
9616
|
+
const durationMs = Date.now() - startedAt;
|
|
9619
9617
|
const isError = statusCode > 400;
|
|
9620
9618
|
const responseData = {
|
|
9621
9619
|
method,
|