@lark-apaas/nestjs-logger 1.0.6 → 1.0.8

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 CHANGED
@@ -9288,8 +9288,9 @@ var BasePinoLogger = class _BasePinoLogger {
9288
9288
  const sanitizedPayload = sanitizeValue(payload);
9289
9289
  const isTriggerLog = firstParam?.module === "trigger";
9290
9290
  const platformModule = isTriggerLog ? "trigger" : firstParam?.paas_attributes_module;
9291
+ const parentSpan = firstParam?.paas_parent_span_context;
9291
9292
  if (process.env.NODE_ENV === "development") {
9292
- if (platformModule) {
9293
+ if (platformModule && !isTriggerLog) {
9293
9294
  return;
9294
9295
  }
9295
9296
  if (messageText) {
@@ -9306,13 +9307,13 @@ var BasePinoLogger = class _BasePinoLogger {
9306
9307
  this.observableService.log(level, finalMessage ?? "", {
9307
9308
  ...payload,
9308
9309
  module: platformModule
9309
- });
9310
+ }, parentSpan);
9310
9311
  } else {
9311
9312
  const reportMessage = this.processLogParams([
9312
9313
  message,
9313
9314
  ...optionalParams
9314
9315
  ]);
9315
- this.observableService.log(level, reportMessage, {});
9316
+ this.observableService.log(level, reportMessage, {}, parentSpan);
9316
9317
  }
9317
9318
  }
9318
9319
  }