@lark-apaas/nestjs-logger 0.1.0-alpha.4 → 0.1.0-alpha.5

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.js CHANGED
@@ -14819,11 +14819,7 @@ var LoggingInterceptor = class {
14819
14819
  duration_ms: durationMs
14820
14820
  };
14821
14821
  if (this.config.logResponseBody && responseData !== void 0) {
14822
- const contentType = res.getHeader("content-type");
14823
- const isJsonResponse = this.isJsonContentType(contentType);
14824
- if (isJsonResponse) {
14825
- responseMeta["response_body"] = this.sanitizeAndTruncate(responseData);
14826
- }
14822
+ responseMeta["response_body"] = this.sanitizeAndTruncate(responseData);
14827
14823
  }
14828
14824
  this.traceLogger.logStructured("verbose", "HTTP request completed", responseMeta, "HTTPTraceInterceptor");
14829
14825
  }), (0, import_operators.catchError)((error) => {
@@ -14876,21 +14872,12 @@ var LoggingInterceptor = class {
14876
14872
  } catch (error) {
14877
14873
  return {
14878
14874
  _error: "Failed to serialize data",
14879
- _message: error instanceof Error ? error.message : String(error)
14875
+ _type: typeof data,
14876
+ _constructor: data?.constructor?.name
14880
14877
  };
14881
14878
  }
14882
14879
  }
14883
14880
  /**
14884
- * 判断是否是 JSON 响应类型
14885
- */
14886
- isJsonContentType(contentType) {
14887
- if (typeof contentType !== "string") {
14888
- return false;
14889
- }
14890
- const contentTypeLower = contentType.toLowerCase();
14891
- return contentTypeLower.includes("application/json");
14892
- }
14893
- /**
14894
14881
  * 脱敏敏感字段
14895
14882
  */
14896
14883
  maskSensitiveFields(data) {