Wide Events & Structured Errors
Logging that
makes sense.
A TypeScript logging library that replaces scattered log lines with comprehensive wide events. One log per request, containing everything you need.
Why evlog.
Traditional logging is broken. Your logs are scattered, each request generates 10+ log lines, and when something goes wrong, you're grep-ing through noise hoping to find signal.
Wide Events
One comprehensive log per request containing all context. No more scattered logs—just signal, no noise.
Structured Errors
Errors with why, fix, and link fields. Actionable context for debugging and resolution.
Request Scoping
Accumulate context throughout the request lifecycle. Emit once at the end with complete data.
Pretty for Dev, JSON for Prod
Human-readable logs in development, machine-parseable JSON in production.
Nuxt & Nitro Ready
First-class integration with Nuxt and Nitro. Auto-create loggers, auto-emit at request end.
Agent-Ready
Structured output that AI agents can parse. Perfect for automated debugging in the agentic era.
The problem.
Multiple requests hit your server simultaneously. Logs arrive mixed together. Which log belongs to which request? Good luck.
Simple API.
Wide events with useLogger. Structured errors with why, fix, and link.
// server/api/checkout.post.ts
export default defineEventHandler(async (event) => {
const log = useLogger(event)
log.set({ user: { id: 1, plan: 'pro' } })
log.set({ cart: { items: 3, total: 9999 } })
return { success: true }
})throw createError({
message: 'Payment failed',
status: 402,
why: 'Card declined by issuer',
fix: 'Try a different payment method',
link: 'https://docs.example.com/payments'
})Ready to fix your logging?
Inspired by Logging Sucks by Boris Tane. One log per request. Everything you need.