neatlogs 1.1.21 → 1.1.22

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/cli.mjs CHANGED
@@ -7096,7 +7096,7 @@ var TELEMETRY_CONFLICT_PRECEDENCE = Object.freeze(
7096
7096
  );
7097
7097
 
7098
7098
  // src/version.ts
7099
- var __version__ = "1.1.21";
7099
+ var __version__ = "1.1.22";
7100
7100
 
7101
7101
  // src/init.ts
7102
7102
  import * as path2 from "path";
@@ -10522,12 +10522,16 @@ var ObservableBatchLogRecordProcessor = class extends BatchLogRecordProcessor {
10522
10522
  // src/core/log.ts
10523
10523
  import { AsyncLocalStorage as AsyncLocalStorage5 } from "async_hooks";
10524
10524
  var logger13 = getLogger();
10525
- var _otelLogger = null;
10526
- var _debugMode = false;
10525
+ var LOG_RUNTIME_STATE_KEY = /* @__PURE__ */ Symbol.for("neatlogs.log_runtime_state");
10526
+ var neatlogsGlobal3 = globalThis;
10527
+ var logRuntimeState = neatlogsGlobal3[LOG_RUNTIME_STATE_KEY] ?? (neatlogsGlobal3[LOG_RUNTIME_STATE_KEY] = {
10528
+ otelLogger: null,
10529
+ debugMode: false
10530
+ });
10527
10531
  var stdoutCaptureContext = new AsyncLocalStorage5();
10528
10532
  function _setOtelLogger(otelLogger, debug) {
10529
- _otelLogger = otelLogger;
10530
- _debugMode = debug;
10533
+ logRuntimeState.otelLogger = otelLogger;
10534
+ logRuntimeState.debugMode = debug;
10531
10535
  }
10532
10536
 
10533
10537
  // src/prompt/client.ts
@@ -11356,7 +11360,7 @@ var _logProvider = null;
11356
11360
  var _spanProcessor = null;
11357
11361
  var _transportSpanProcessors = [];
11358
11362
  var _completionProcessor = null;
11359
- var _debugMode2 = false;
11363
+ var _debugMode = false;
11360
11364
  var _deliveryDiagnostics = new DeliveryDiagnostics();
11361
11365
  var _initIdentity = null;
11362
11366
  var _effectiveSampleRate = 1;
@@ -11648,7 +11652,7 @@ async function _performInit(options) {
11648
11652
  if (options.debug) {
11649
11653
  enableDebugLogging();
11650
11654
  }
11651
- _debugMode2 = options.debug ?? false;
11655
+ _debugMode = options.debug ?? false;
11652
11656
  const resolvedWorkflowName = _resolveWorkflowName(options.workflowName);
11653
11657
  const endpoint = resolveInitEndpoint(options.endpoint);
11654
11658
  const baseUrl = resolveIngestBaseUrl(endpoint);
@@ -11986,7 +11990,7 @@ async function _performShutdown(terminationReason, timeoutMs) {
11986
11990
  _spanProcessor = null;
11987
11991
  _transportSpanProcessors = [];
11988
11992
  _completionProcessor = null;
11989
- _debugMode2 = false;
11993
+ _debugMode = false;
11990
11994
  _effectiveSampleRate = 1;
11991
11995
  _exportEnabled = false;
11992
11996
  _queueMaxSize = 2048;