diff --git a/.changeset/set-level-manual.md b/.changeset/set-level-manual.md deleted file mode 100644 index 75fa9626..00000000 --- a/.changeset/set-level-manual.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'evlog': minor ---- - -Add `log.setLevel(level)` to promote the wide event level explicitly without touching the `error` context. - -`log.error(err)` populates `error: { name, message, stack, ... }` from the thrown value. When you want to mark the event as `error` (or `warn`) while controlling the `error` field yourself — typed error codes, no stack, custom shapes — call `log.setLevel('error' | 'warn' | 'info' | 'debug')` and pair it with `log.set({ error: { code: 'PAYMENT_DECLINED' } })`. The explicit level wins over the level computed from `.error()` / `.warn()`. - -```ts -log.setLevel('error') -log.set({ error: { code: 'PAYMENT_DECLINED', reason: 'insufficient_funds' } }) -``` - -Closes [#301](https://github.com/HugoRCD/evlog/issues/301). diff --git a/examples/community-adapter-skeleton/CHANGELOG.md b/examples/community-adapter-skeleton/CHANGELOG.md index 47971577..7cba30c0 100644 --- a/examples/community-adapter-skeleton/CHANGELOG.md +++ b/examples/community-adapter-skeleton/CHANGELOG.md @@ -1,5 +1,12 @@ # evlog-community-adapter-skeleton +## 4.0.0 + +### Patch Changes + +- Updated dependencies [[`31b6b31`](https://github.com/HugoRCD/evlog/commit/31b6b310b1f0a9d0919888d49664927ad0f2f146)]: + - evlog@2.18.0 + ## 3.0.0 ### Patch Changes diff --git a/examples/community-adapter-skeleton/package.json b/examples/community-adapter-skeleton/package.json index 0fe2b1b4..eae82fd5 100644 --- a/examples/community-adapter-skeleton/package.json +++ b/examples/community-adapter-skeleton/package.json @@ -1,6 +1,6 @@ { "name": "evlog-community-adapter-skeleton", - "version": "3.0.0", + "version": "4.0.0", "description": "Reference skeleton for a community evlog drain adapter built on defineHttpDrain.", "private": true, "type": "module", diff --git a/examples/community-enricher-skeleton/CHANGELOG.md b/examples/community-enricher-skeleton/CHANGELOG.md index 1b10986c..d30e990b 100644 --- a/examples/community-enricher-skeleton/CHANGELOG.md +++ b/examples/community-enricher-skeleton/CHANGELOG.md @@ -1,5 +1,12 @@ # evlog-community-enricher-skeleton +## 4.0.0 + +### Patch Changes + +- Updated dependencies [[`31b6b31`](https://github.com/HugoRCD/evlog/commit/31b6b310b1f0a9d0919888d49664927ad0f2f146)]: + - evlog@2.18.0 + ## 3.0.0 ### Patch Changes diff --git a/examples/community-enricher-skeleton/package.json b/examples/community-enricher-skeleton/package.json index b171611b..6f0ed005 100644 --- a/examples/community-enricher-skeleton/package.json +++ b/examples/community-enricher-skeleton/package.json @@ -1,6 +1,6 @@ { "name": "evlog-community-enricher-skeleton", - "version": "3.0.0", + "version": "4.0.0", "description": "Reference skeleton for a community evlog enricher built on defineEnricher.", "private": true, "type": "module", diff --git a/examples/community-framework-skeleton/CHANGELOG.md b/examples/community-framework-skeleton/CHANGELOG.md index 14562585..267982c3 100644 --- a/examples/community-framework-skeleton/CHANGELOG.md +++ b/examples/community-framework-skeleton/CHANGELOG.md @@ -1,5 +1,12 @@ # evlog-community-framework-skeleton +## 4.0.0 + +### Patch Changes + +- Updated dependencies [[`31b6b31`](https://github.com/HugoRCD/evlog/commit/31b6b310b1f0a9d0919888d49664927ad0f2f146)]: + - evlog@2.18.0 + ## 3.0.0 ### Patch Changes diff --git a/examples/community-framework-skeleton/package.json b/examples/community-framework-skeleton/package.json index 0b1fb3b8..76f845d6 100644 --- a/examples/community-framework-skeleton/package.json +++ b/examples/community-framework-skeleton/package.json @@ -1,6 +1,6 @@ { "name": "evlog-community-framework-skeleton", - "version": "3.0.0", + "version": "4.0.0", "description": "Reference skeleton for a community evlog framework integration built on defineFrameworkIntegration.", "private": true, "type": "module", diff --git a/packages/evlog/CHANGELOG.md b/packages/evlog/CHANGELOG.md index f7681d18..71c579de 100644 --- a/packages/evlog/CHANGELOG.md +++ b/packages/evlog/CHANGELOG.md @@ -1,5 +1,22 @@ # evlog +## 2.18.0 + +### Minor Changes + +- [#339](https://github.com/HugoRCD/evlog/pull/339) [`31b6b31`](https://github.com/HugoRCD/evlog/commit/31b6b310b1f0a9d0919888d49664927ad0f2f146) Thanks [@HugoRCD](https://github.com/HugoRCD)! - Add `log.setLevel(level)` to promote the wide event level explicitly without touching the `error` context. + + `log.error(err)` populates `error: { name, message, stack, ... }` from the thrown value. When you want to mark the event as `error` (or `warn`) while controlling the `error` field yourself — typed error codes, no stack, custom shapes — call `log.setLevel('error' | 'warn' | 'info' | 'debug')` and pair it with `log.set({ error: { code: 'PAYMENT_DECLINED' } })`. The explicit level wins over the level computed from `.error()` / `.warn()`. + + ```ts + log.setLevel("error"); + log.set({ + error: { code: "PAYMENT_DECLINED", reason: "insufficient_funds" }, + }); + ``` + + Closes [#301](https://github.com/HugoRCD/evlog/issues/301). + ## 2.17.0 ### Minor Changes diff --git a/packages/evlog/package.json b/packages/evlog/package.json index 02c16caf..a9f3c523 100644 --- a/packages/evlog/package.json +++ b/packages/evlog/package.json @@ -1,6 +1,6 @@ { "name": "evlog", - "version": "2.17.0", + "version": "2.18.0", "description": "Modern TypeScript logger — simple logs, wide events, structured errors. Built for scripts, libraries, jobs, edge, and HTTP. One drain pipeline everywhere.", "author": "HugoRCD ", "homepage": "https://evlog.dev",