Frameworks
Framework Integrations
evlog supports every major TypeScript framework. Choose your stack and get started in minutes.
evlog ships an integration for every major TypeScript framework. log.set(), createError() and parseError() behave the same in all of them, so the table below is a table of setup steps, not of feature sets.
No HTTP framework? Use Standalone TypeScript for scripts, libraries, and workers, and Cloudflare Workers on the edge.
Pick your framework
| Framework | Import | Type | Logger Access | Status |
|---|---|---|---|---|
| Nuxt | evlog/nuxt | Module | useLogger(event) | Stable |
| Next.js | evlog/next | Factory | useLogger() | Stable |
| SvelteKit | evlog/sveltekit | Hooks | event.locals.log / useLogger() | Stable |
| Nitro | evlog/nitro | Module | useLogger(event) | Stable |
| TanStack Start | evlog/nitro/v3 | Module | useRequest().context.log | Stable |
| TanStack Router | evlog/nitro/v3 | Module | Via TanStack Start (uses Nitro v3) | Stable |
| React Router | evlog/react-router | Middleware | context.get(loggerContext) / useLogger() | Stable |
| NestJS | evlog/nestjs | Module | useLogger() | Stable |
| Express | evlog/express | Middleware | req.log / useLogger() | Stable |
| Hono | evlog/hono | Middleware | c.get('log') / useLogger() | Stable |
| Fastify | evlog/fastify | Plugin | request.log / useLogger() | Stable |
| Elysia | evlog/elysia | Plugin | log (context) / useLogger() | Stable |
| oRPC | evlog/orpc | Handler wrapper + middleware | context.log / useLogger() | Stable |
| Cloudflare Workers | evlog/workers | Factory | createWorkersLogger() | Stable |
| AWS Lambda | evlog | Manual | createLogger() / createRequestLogger() | Guide |
| Standalone | evlog | Manual | createLogger() / createRequestLogger() | Stable |
| Astro | evlog | Manual | createRequestLogger() | Guide |
| Custom | evlog/toolkit | Build your own | createMiddlewareLogger() | Beta |
What differs from one framework to the next
Two things differ per framework: how you start evlog, and how a handler reaches the request logger.
Start evlog
| Pattern | Frameworks |
|---|---|
evlog(options) middleware / plugin | Hono, Express, Fastify, Elysia, SvelteKit, React Router |
createEvlog(options) factory | Next.js |
EvlogModule.forRoot() | NestJS |
| Module default export | Nuxt, Nitro v2/v3 |
| Manual factory | Cloudflare Workers (createWorkersLogger), Standalone, AWS Lambda, Astro |
Reach the logger from a handler
| Pattern | Frameworks |
|---|---|
useLogger(event) | Nuxt, Nitro |
useLogger() | Next.js, NestJS, Express, Fastify, Elysia, SvelteKit, React Router, Hono |
c.get('log') | Hono |
req.log | Express |
request.log | Fastify |
event.locals.log | SvelteKit |
context.get(loggerContext) | React Router |
createRequestLogger() / createLogger() | Standalone, Workers, manual setups |
On Hono, use
c.get('log') inside handlers and useLogger() from evlog/hono in the layers underneath. See Hono integration.Full-stack frameworks
Server frameworks
All frameworks support the same features: wide events, structured errors, drain adapters, enrichers, sampling, and AI SDK integration.
Strip client logs at build time
For any Vite-based project, the evlog/vite plugin adds build-time optimizations:
- Auto-initialization: no
initLogger()call needed - Debug stripping:
log.debug()removed from production builds - Source location: inject
__source: 'file:line'into log calls
It works with SvelteKit, Hono through vite-node, and any Vite-powered setup. Under Nuxt the same three options live on the evlog/nuxt module, so the plugin does not need to be added by hand.