@contrail/telemetry 2.0.6-alpha.0 → 2.0.7

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.
@@ -7,14 +7,13 @@ exports.stdoutWriter = void 0;
7
7
  //
8
8
  // Guard: app-framework's hijackConsole() replaces console.log with overridenLog,
9
9
  // which routes back into pino — using it here would create an infinite loop.
10
- // We detect that specific replacement by name. Any other replacement (e.g. the
11
- // OTel Lambda layer's console patch) is safe to use.
10
+ // Any other console.log replacement (e.g. the OTel Lambda layer) is safe to use.
12
11
  const _capturedConsoleLog = console.log;
13
- const isAppFrameworkHijack = _capturedConsoleLog.name === 'overridenLog';
12
+ const isConsoleHijacked = _capturedConsoleLog.name === 'overridenLog';
14
13
  // Wrapped in an object so tests can jest.spyOn(stdoutWriter, 'log') regardless
15
14
  // of Jest's console patching strategy (BufferedConsole vs CustomConsole).
16
15
  exports.stdoutWriter = {
17
- log: isAppFrameworkHijack
16
+ log: isConsoleHijacked
18
17
  ? (...args) => process.stdout.write(args.map(String).join(' ') + '\n')
19
18
  : _capturedConsoleLog,
20
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/telemetry",
3
- "version": "2.0.6-alpha.0",
3
+ "version": "2.0.7",
4
4
  "description": "Telemetry and monitoring utilities for contrail services",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",