@lark-apaas/nestjs-logger 1.0.2-alpha.33 → 1.0.2-alpha.35
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 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -9286,6 +9286,9 @@ var BasePinoLogger = class _BasePinoLogger {
|
|
|
9286
9286
|
const pinoLevel = mapLogLevelToPino(level);
|
|
9287
9287
|
const sanitizedPayload = sanitizeValue(payload);
|
|
9288
9288
|
if (process.env.NODE_ENV === "development") {
|
|
9289
|
+
if (sanitizedPayload.source_type === "platform") {
|
|
9290
|
+
return;
|
|
9291
|
+
}
|
|
9289
9292
|
if (messageText) {
|
|
9290
9293
|
this.logger[pinoLevel](sanitizedPayload, messageText);
|
|
9291
9294
|
} else {
|
|
@@ -9571,10 +9574,12 @@ url=${req.url}`, "HTTPTraceInterceptor");
|
|
|
9571
9574
|
path,
|
|
9572
9575
|
url: fullUrl,
|
|
9573
9576
|
duration_ms: durationMs,
|
|
9574
|
-
request_body:
|
|
9575
|
-
response: responseMeta["response_body"] ?? {},
|
|
9577
|
+
request_body: req.body ?? {},
|
|
9576
9578
|
error_message: isError ? finalResponseBody?.message ?? "" : ""
|
|
9577
9579
|
};
|
|
9580
|
+
if (isJsonResponse) {
|
|
9581
|
+
responseData.response = JSON.parse(finalResponseBody);
|
|
9582
|
+
}
|
|
9578
9583
|
const reportData = JSON.stringify(responseData);
|
|
9579
9584
|
appLog(reportData, {
|
|
9580
9585
|
source_type: "platform"
|