Skip to content

Commit 9ef4097

Browse files
Version Packages
1 parent 96c47cd commit 9ef4097

4 files changed

Lines changed: 15 additions & 18 deletions

File tree

.changeset/fix-middleware-uselogger.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.changeset/react-router-integration.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/evlog/CHANGELOG.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
# evlog
22

3+
## 2.9.0
4+
5+
### Minor Changes
6+
7+
- [#212](https://github.com/HugoRCD/evlog/pull/212) [`96c47cd`](https://github.com/HugoRCD/evlog/commit/96c47cd3adfbaf0e6c53db9be55b45f652dfbdb8) Thanks [@MrLightful](https://github.com/MrLightful)! - Add React Router middleware integration (`evlog/react-router`) with automatic wide-event logging, drain, enrich, and tail sampling support
8+
9+
### Patch Changes
10+
11+
- [#215](https://github.com/HugoRCD/evlog/pull/215) [`31cb4ab`](https://github.com/HugoRCD/evlog/commit/31cb4ab903c969107a368cb5a9629eff6fe0c63b) Thanks [@HugoRCD](https://github.com/HugoRCD)! - fix(nitro): always create logger in request hook so `useLogger()` works in server middleware
12+
13+
Previously, calling `useLogger(event)` inside a Nuxt server middleware would throw `"Logger not initialized"` because the Nitro plugin skipped logger creation for routes not matching `include` patterns. Since middleware runs for every request, this made it impossible to use `useLogger` there.
14+
15+
The `shouldLog` filtering is now evaluated at emit time instead of creation time — the logger is always available on `event.context.log`, but events for non-matching routes are silently discarded.
16+
317
## 2.8.0
418

519
### Minor Changes
620

721
- [#196](https://github.com/HugoRCD/evlog/pull/196) [`abda28c`](https://github.com/HugoRCD/evlog/commit/abda28cc00b6276a59c2cf9dcfca295f4d7b878c) Thanks [@HugoRCD](https://github.com/HugoRCD)! - Add `evlog/ai` integration for AI SDK v6+ observability.
8-
922
- `createAILogger(log)` returns an `AILogger` with `wrap()` and `captureEmbed()`
1023
- Model middleware captures token usage, tool calls, finish reason, and streaming metrics
1124
- Supports `generateText`, `streamText`, `generateObject`, `streamObject`, and `ToolLoopAgent`
@@ -19,7 +32,6 @@
1932
- `ai` is an optional peer dependency
2033

2134
- [#189](https://github.com/HugoRCD/evlog/pull/189) [`d92fb46`](https://github.com/HugoRCD/evlog/commit/d92fb46b2d272dca0de73a0ffedda746304f57b6) Thanks [@HugoRCD](https://github.com/HugoRCD)! - Add `evlog/vite` plugin for build-time DX enhancements in any Vite-based framework.
22-
2335
- Zero-config auto-initialization via Vite `define` (no `initLogger()` needed)
2436
- Build-time `log.debug()` stripping in production builds (default)
2537
- Source location injection (`__source: 'file:line'`) for object-form log calls
@@ -31,7 +43,6 @@
3143
### Patch Changes
3244

3345
- [#197](https://github.com/HugoRCD/evlog/pull/197) [`3601d30`](https://github.com/HugoRCD/evlog/commit/3601d303c122509a8f665f20e8275248e6e6e7f5) Thanks [@HugoRCD](https://github.com/HugoRCD)! - Add retry with exponential backoff to all HTTP drain adapters and improve timeout error messages.
34-
3546
- Transient failures (timeouts, network errors, 5xx) are retried up to 2 times with exponential backoff (200ms, 400ms)
3647
- `AbortError` timeout errors now display a clear message: `"Axiom request timed out after 5000ms"` instead of the cryptic `"DOMException [AbortError]: This operation was aborted"`
3748
- New `retries` option on all adapter configs (Axiom, OTLP, Sentry, PostHog, Better Stack)

packages/evlog/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "evlog",
3-
"version": "2.8.0",
3+
"version": "2.9.0",
44
"description": "Wide event logging library with structured error handling. Inspired by LoggingSucks.",
55
"author": "HugoRCD <contact@hrcd.fr>",
66
"homepage": "https://evlog.dev",

0 commit comments

Comments
 (0)