@bymax-one/nest-logger 1.4.3 → 1.4.4

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/README.md +10 -11
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -11,6 +11,21 @@ heading here.
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [1.4.4] - 2026-11-01
15
+
16
+ ### Documentation
17
+
18
+ - The Quick Start's "Output (JSON, production)" sample is now exactly what the flow prints:
19
+ it gains `deployment`, `userId` and `event.name`, and its version matches the snippet. The
20
+ request and trace fields (`requestId`, `tenantId`, `traceId`, `spanId`) are no longer in it, since
21
+ they are absent outside an HTTP request and an active span; a sentence says when they appear.
22
+
23
+ ### Tests
24
+
25
+ - A unit test executes the README Quick Start (sections 2 and 4) as written and asserts the JSON
26
+ lines it logs. `check:published` only type-checks the snippets; this one runs them. It also
27
+ requires the README's "Output (JSON, production)" sample to have the same keys as the real line.
28
+
14
29
  ## [1.4.3] - 2026-10-31
15
30
 
16
31
  ### Added
@@ -2192,7 +2207,8 @@ published `dist/` is identical — no runtime behaviour changes for consumers.
2192
2207
  - Professional CI suite: `ci.yml`, `bench.yml`, `codeql.yml`, `scorecard.yml`,
2193
2208
  `release.yml`, Dependabot, and issue templates
2194
2209
 
2195
- [Unreleased]: https://github.com/bymaxone/nest-logger/compare/v1.4.3...HEAD
2210
+ [Unreleased]: https://github.com/bymaxone/nest-logger/compare/v1.4.4...HEAD
2211
+ [1.4.4]: https://github.com/bymaxone/nest-logger/compare/v1.4.3...v1.4.4
2196
2212
  [1.4.3]: https://github.com/bymaxone/nest-logger/compare/v1.4.2...v1.4.3
2197
2213
  [1.4.2]: https://github.com/bymaxone/nest-logger/compare/v1.4.1...v1.4.2
2198
2214
  [1.4.1]: https://github.com/bymaxone/nest-logger/compare/v1.4.0...v1.4.1
package/README.md CHANGED
@@ -325,31 +325,30 @@ export class PaymentsService {
325
325
  }
326
326
  ```
327
327
 
328
- Output (JSON, production):
328
+ Output (JSON, production) for the `PAYMENT_REFUND_SUCCESS` call above, with the options from step 2:
329
329
 
330
330
  ```json
331
331
  {
332
332
  "level": "info",
333
333
  "time": "2026-05-28T10:12:44.512Z",
334
- "service": { "name": "my-app", "version": "abc123" },
335
- "logKey": "PAYMENT_REFUND_SUCCESS",
336
- "msg": "Refund processed",
334
+ "service": { "name": "my-app", "version": "1.0.0" },
335
+ "deployment": { "environment": { "name": "production" } },
337
336
  "context": "PaymentsService",
338
- "requestId": "r_7f3a9b",
339
- "tenantId": "t_acme",
340
- "traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
341
- "spanId": "00f067aa0ba902b7",
342
337
  "paymentId": "pi_xyz",
343
- "stripeRefundId": "re_abc"
338
+ "stripeRefundId": "re_abc",
339
+ "logKey": "PAYMENT_REFUND_SUCCESS",
340
+ "userId": "u_42",
341
+ "event.name": "payment.refund.success",
342
+ "msg": "Refund processed"
344
343
  }
345
344
  ```
346
345
 
346
+ `requestId` and `tenantId` are added when the call runs inside an HTTP request that passed through the request-ID middleware (`tenantId` only when the request carries the tenant header), and `traceId` and `spanId` when an OpenTelemetry span is active (see [OpenTelemetry correlation](#6-opentelemetry-correlation)). Outside a request, as in the flow above, they are absent.
347
+
347
348
  Output (pretty-print, development):
348
349
 
349
350
  ```
350
351
  [10:12:44.512] INFO (my-app): PAYMENT_REFUND_SUCCESS
351
- requestId: "r_7f3a9b"
352
- tenantId: "t_acme"
353
352
  paymentId: "pi_xyz"
354
353
  stripeRefundId: "re_abc"
355
354
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bymax-one/nest-logger",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Structured JSON logging for NestJS based on Pino 10, with optional OpenTelemetry correlation.",
5
5
  "author": "Bymax One <support@bymax.one>",
6
6
  "license": "MIT",