@@ -176,18 +176,43 @@ The wide event emitted at the end contains **everything**:
176176
177177Works with ** any framework powered by Nitro** : Nuxt, Analog, Vinxi, SolidStart, TanStack Start, and more.
178178
179+ ### Nitro v3
180+
179181``` typescript
180182// nitro.config.ts
183+ import { defineConfig } from ' nitro'
184+ import evlog from ' evlog/nitro/v3'
185+
186+ export default defineConfig ({
187+ modules: [
188+ evlog ({ env: { service: ' my-api' } })
189+ ],
190+ })
191+ ```
192+
193+ ### Nitro v2
194+
195+ ``` typescript
196+ // nitro.config.ts
197+ import { defineNitroConfig } from ' nitropack/config'
198+ import evlog from ' evlog/nitro'
199+
181200export default defineNitroConfig ({
182- plugins: [' evlog/nitro' ],
201+ modules: [
202+ evlog ({ env: { service: ' my-api' } })
203+ ],
183204})
184205```
185206
186- Same API, same wide events :
207+ Then use ` useLogger ` in any route. Import from ` evlog/nitro/v3 ` (v3) or ` evlog/nitro ` (v2) :
187208
188209``` typescript
189210// routes/api/documents/[id]/export.post.ts
190- import { useLogger , createError } from ' evlog'
211+ // Nitro v3: import { defineHandler } from 'nitro/h3' + import { useLogger } from 'evlog/nitro/v3'
212+ // Nitro v2: import { defineEventHandler } from 'h3' + import { useLogger } from 'evlog/nitro'
213+ import { defineEventHandler } from ' h3'
214+ import { useLogger } from ' evlog/nitro'
215+ import { createError } from ' evlog'
191216
192217export default defineEventHandler (async (event ) => {
193218 const log = useLogger (event )
@@ -833,11 +858,12 @@ evlog works with any framework powered by [Nitro](https://nitro.unjs.io/):
833858| Framework | Integration |
834859| -----------| -------------|
835860| ** Nuxt** | ` modules: ['evlog/nuxt'] ` |
836- | ** Analog** | ` plugins: ['evlog/nitro'] ` |
837- | ** Vinxi** | ` plugins: ['evlog/nitro'] ` |
838- | ** SolidStart** | ` plugins: ['evlog/nitro'] ` |
839- | ** TanStack Start** | ` plugins: ['evlog/nitro'] ` |
840- | ** Standalone Nitro** | ` plugins: ['evlog/nitro'] ` |
861+ | ** Nitro v3** | ` modules: [evlog()] ` with ` import evlog from 'evlog/nitro/v3' ` |
862+ | ** Nitro v2** | ` modules: [evlog()] ` with ` import evlog from 'evlog/nitro' ` |
863+ | ** Analog** | Nitro v2 module setup |
864+ | ** Vinxi** | Nitro v2 module setup |
865+ | ** SolidStart** | Nitro v2 module setup ([ example] ( ./examples/solidstart ) ) |
866+ | ** TanStack Start** | Nitro v2 module setup |
841867
842868## Agent Skills
843869
0 commit comments