You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`env.environment`|`string`| Auto-detected | Environment name |
57
57
|`include`|`string[]`|`undefined`| Route patterns to log. Supports glob (`/api/**`). If not set, all routes are logged |
58
58
|`exclude`|`string[]`|`undefined`| Route patterns to exclude from logging. Supports glob (`/api/_nuxt_icon/**`). Exclusions take precedence over inclusions |
59
+
|`routes`|`Record<string, RouteConfig>`|`undefined`| Route-specific service configuration. Allows setting different service names for different routes using glob patterns |
59
60
|`pretty`|`boolean`|`true` in dev | Pretty print with tree formatting |
60
61
|`sampling.rates`|`object`|`undefined`| Head sampling rates per log level (0-100%). See [Sampling](#sampling)|
61
62
|`sampling.keep`|`array`|`undefined`| Tail sampling conditions to force-keep logs. See [Sampling](#sampling)|
All logs from matching routes will automatically include the configured service name. This is especially useful when:
111
+
- Running multiple microservices behind a single Nuxt server
112
+
- Organizing logs by business domain (auth, payment, inventory)
113
+
- Differentiating between API versions (`/api/v1/**`, `/api/v2/**`)
114
+
115
+
You can also override the service name per handler using `useLogger(event, 'service-name')`. See [Quick Start - Service Identification](/getting-started/quick-start#service-identification) for details.
116
+
89
117
### Sampling
90
118
91
119
At scale, logging everything can become expensive. evlog supports two sampling strategies:
0 commit comments