UNPKG

unnbound-logger-sdk

Version:

A structured logging library with TypeScript support using Pino. Provides consistent, well-typed logging with automatic logId, workflowId, traceId, and deploymentId tracking across operational contexts.

11 lines (10 loc) 431 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.withStorage = exports.storage = void 0; const async_hooks_1 = require("async_hooks"); exports.storage = new async_hooks_1.AsyncLocalStorage(); const withStorage = async (data, callback) => { const previous = exports.storage.getStore(); return exports.storage.run({ ...previous, ...data }, callback); }; exports.withStorage = withStorage;