unnbound-logger-sdk 3.0.4 → 3.0.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/logger.js CHANGED
@@ -5,17 +5,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.logger = void 0;
7
7
  const pino_1 = __importDefault(require("pino"));
8
+ const uuid_1 = require("uuid");
8
9
  const storage_1 = require("./storage");
9
10
  exports.logger = (0, pino_1.default)({
10
11
  level: process.env.LOG_LEVEL ?? 'info',
11
12
  base: {
12
13
  environment: process.env.ENVIRONMENT,
13
14
  workflowId: process.env.UNNBOUND_WORKFLOW_ID,
14
- workflowUrl: process.env.UNNBOUND_WORKFLOW_URL,
15
15
  serviceId: process.env.UNNBOUND_SERVICE_ID,
16
16
  deploymentId: process.env.UNNBOUND_DEPLOYMENT_ID,
17
17
  },
18
- mixin: () => ({ ...storage_1.storage.getStore() }),
18
+ mixin: () => ({ ...storage_1.storage.getStore(), logId: (0, uuid_1.v4)() }),
19
19
  serializers: {
20
20
  req: pino_1.default.stdSerializers.req,
21
21
  res: pino_1.default.stdSerializers.res,
package/dist/types.d.ts CHANGED
@@ -8,15 +8,16 @@ export type LogLevel = 'info' | 'debug' | 'error' | 'warn';
8
8
  /**
9
9
  * Available log types
10
10
  */
11
- export type LogType = 'general' | 'http' | 'sftp' | 'dbQueryTransaction';
11
+ export type LogType = 'general' | 'http' | 'sftp';
12
12
  /**
13
13
  * HTTP methods supported for HTTP logging
14
14
  */
15
15
  export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'HEAD';
16
16
  export interface Log<T extends LogType = 'general'> {
17
+ logId: string;
17
18
  level: LogLevel;
18
19
  message: string;
19
- traceId: string;
20
+ traceId?: string;
20
21
  spanId?: string;
21
22
  type: T;
22
23
  serviceId: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unnbound-logger-sdk",
3
3
  "description": "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.",
4
- "version": "3.0.4",
4
+ "version": "3.0.5",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "keywords": [
@@ -69,6 +69,7 @@
69
69
  "format": "prettier --write .",
70
70
  "format:check": "prettier --check .",
71
71
  "start:example:node-app": "npx tsx --watch examples/node-app.ts",
72
- "start:example:basic-usage": "npx tsx --watch examples/basic-usage.ts"
72
+ "start:example:basic-usage": "npx tsx --watch examples/basic-usage.ts",
73
+ "version:bump": "npm version patch"
73
74
  }
74
75
  }