@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.js
CHANGED
|
@@ -9269,6 +9269,9 @@ var BasePinoLogger = class _BasePinoLogger {
|
|
|
9269
9269
|
const pinoLevel = mapLogLevelToPino(level);
|
|
9270
9270
|
const sanitizedPayload = sanitizeValue(payload);
|
|
9271
9271
|
if (process.env.NODE_ENV === "development") {
|
|
9272
|
+
if (sanitizedPayload.source_type === "platform") {
|
|
9273
|
+
return;
|
|
9274
|
+
}
|
|
9272
9275
|
if (messageText) {
|
|
9273
9276
|
this.logger[pinoLevel](sanitizedPayload, messageText);
|
|
9274
9277
|
} else {
|
|
@@ -9554,10 +9557,12 @@ url=${req.url}`, "HTTPTraceInterceptor");
|
|
|
9554
9557
|
path,
|
|
9555
9558
|
url: fullUrl,
|
|
9556
9559
|
duration_ms: durationMs,
|
|
9557
|
-
request_body:
|
|
9558
|
-
response: responseMeta["response_body"] ?? {},
|
|
9560
|
+
request_body: req.body ?? {},
|
|
9559
9561
|
error_message: isError ? finalResponseBody?.message ?? "" : ""
|
|
9560
9562
|
};
|
|
9563
|
+
if (isJsonResponse) {
|
|
9564
|
+
responseData.response = JSON.parse(finalResponseBody);
|
|
9565
|
+
}
|
|
9561
9566
|
const reportData = JSON.stringify(responseData);
|
|
9562
9567
|
appLog(reportData, {
|
|
9563
9568
|
source_type: "platform"
|