[{"data":1,"prerenderedAt":1583},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-introduction":454,"-getting-started-introduction-surround":1579},[4,35,159,201,289,352,438],{"title":5,"path":6,"stem":7,"children":8,"page":34},"Getting Started","\u002Fgetting-started","1.getting-started",[9,14,19,24,29],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-info",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quick Start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start","i-lucide-zap",{"title":25,"path":26,"stem":27,"icon":28},"Agent Skills","\u002Fgetting-started\u002Fagent-skills","1.getting-started\u002F4.agent-skills","i-lucide-sparkles",{"title":30,"path":31,"stem":32,"icon":33},"vs Other Loggers","\u002Fgetting-started\u002Fvs-other-loggers","1.getting-started\u002F5.vs-other-loggers","i-lucide-scale",false,{"title":36,"path":37,"stem":38,"children":39,"page":34},"Logging","\u002Flogging","2.logging",[40,45,50,55,60,65,70,99,127],{"title":41,"path":42,"stem":43,"icon":44},"Overview","\u002Flogging\u002Foverview","2.logging\u002F0.overview","i-lucide-list",{"title":46,"path":47,"stem":48,"icon":49},"Simple Logging","\u002Flogging\u002Fsimple-logging","2.logging\u002F1.simple-logging","i-lucide-terminal",{"title":51,"path":52,"stem":53,"icon":54},"Wide Events","\u002Flogging\u002Fwide-events","2.logging\u002F2.wide-events","i-lucide-layers",{"title":56,"path":57,"stem":58,"icon":59},"Structured Errors","\u002Flogging\u002Fstructured-errors","2.logging\u002F3.structured-errors","i-lucide-shield-alert",{"title":61,"path":62,"stem":63,"icon":64},"Catalogs","\u002Flogging\u002Fcatalogs","2.logging\u002F4.catalogs","i-lucide-book-open",{"title":66,"path":67,"stem":68,"icon":69},"Client Logging","\u002Flogging\u002Fclient-logging","2.logging\u002F5.client-logging","i-lucide-monitor",{"title":71,"icon":72,"path":73,"stem":74,"children":75,"page":34},"AI SDK","i-simple-icons-vercel","\u002Flogging\u002Fai-sdk","2.logging\u002F6.ai-sdk",[76,79,84,89,94],{"title":41,"path":77,"stem":78,"icon":44},"\u002Flogging\u002Fai-sdk\u002Foverview","2.logging\u002F6.ai-sdk\u002F01.overview",{"title":80,"path":81,"stem":82,"icon":83},"Usage","\u002Flogging\u002Fai-sdk\u002Fusage","2.logging\u002F6.ai-sdk\u002F02.usage","i-lucide-code",{"title":85,"path":86,"stem":87,"icon":88},"Options","\u002Flogging\u002Fai-sdk\u002Foptions","2.logging\u002F6.ai-sdk\u002F03.options","i-lucide-sliders",{"title":90,"path":91,"stem":92,"icon":93},"Metadata","\u002Flogging\u002Fai-sdk\u002Fmetadata","2.logging\u002F6.ai-sdk\u002F04.metadata","i-lucide-database",{"title":95,"path":96,"stem":97,"icon":98},"Telemetry","\u002Flogging\u002Fai-sdk\u002Ftelemetry","2.logging\u002F6.ai-sdk\u002F05.telemetry","i-lucide-activity",{"title":100,"icon":101,"path":102,"stem":103,"children":104,"page":34},"Better Auth","i-simple-icons-betterauth","\u002Flogging\u002Fbetter-auth","2.logging\u002F7.better-auth",[105,108,113,118,122],{"title":41,"path":106,"stem":107,"icon":44},"\u002Flogging\u002Fbetter-auth\u002Foverview","2.logging\u002F7.better-auth\u002F01.overview",{"title":109,"path":110,"stem":111,"icon":112},"Identify User","\u002Flogging\u002Fbetter-auth\u002Fidentify-user","2.logging\u002F7.better-auth\u002F02.identify-user","i-lucide-user-check",{"title":114,"path":115,"stem":116,"icon":117},"Middleware","\u002Flogging\u002Fbetter-auth\u002Fmiddleware","2.logging\u002F7.better-auth\u002F03.middleware","i-lucide-shield",{"title":119,"path":120,"stem":121,"icon":69},"Client Sync","\u002Flogging\u002Fbetter-auth\u002Fclient-sync","2.logging\u002F7.better-auth\u002F04.client-sync",{"title":123,"path":124,"stem":125,"icon":126},"Performance","\u002Flogging\u002Fbetter-auth\u002Fperformance","2.logging\u002F7.better-auth\u002F05.performance","i-lucide-gauge",{"title":128,"icon":129,"path":130,"stem":131,"children":132,"page":34},"Audit Logs","i-lucide-shield-check","\u002Flogging\u002Faudit","2.logging\u002F8.audit",[133,136,141,146,151,155],{"title":41,"path":134,"stem":135,"icon":44},"\u002Flogging\u002Faudit\u002Foverview","2.logging\u002F8.audit\u002F01.overview",{"title":137,"path":138,"stem":139,"icon":140},"Schema","\u002Flogging\u002Faudit\u002Fschema","2.logging\u002F8.audit\u002F02.schema","i-lucide-file-text",{"title":142,"path":143,"stem":144,"icon":145},"Recording","\u002Flogging\u002Faudit\u002Frecording","2.logging\u002F8.audit\u002F03.recording","i-lucide-pen-line",{"title":147,"path":148,"stem":149,"icon":150},"Drains","\u002Flogging\u002Faudit\u002Fpipeline","2.logging\u002F8.audit\u002F04.pipeline","i-lucide-link",{"title":152,"path":153,"stem":154,"icon":129},"Compliance","\u002Flogging\u002Faudit\u002Fcompliance","2.logging\u002F8.audit\u002F05.compliance",{"title":156,"path":157,"stem":158,"icon":64},"Recipes","\u002Flogging\u002Faudit\u002Frecipes","2.logging\u002F8.audit\u002F06.recipes",{"title":160,"path":161,"stem":162,"children":163,"page":34},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[164,169,174,179,184,188,191,196],{"title":165,"path":166,"stem":167,"icon":168},"Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":170,"path":171,"stem":172,"icon":173},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F1.configuration","i-lucide-settings",{"title":175,"path":176,"stem":177,"icon":178},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F2.sampling","i-lucide-filter",{"title":180,"path":181,"stem":182,"icon":183},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F3.typed-fields","i-simple-icons-typescript",{"title":185,"path":186,"stem":187,"icon":129},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F4.best-practices",{"title":123,"path":189,"stem":190,"icon":126},"\u002Fcore-concepts\u002Fperformance","3.core-concepts\u002F5.performance",{"title":192,"path":193,"stem":194,"icon":195},"Vite Plugin","\u002Fcore-concepts\u002Fvite-plugin","3.core-concepts\u002F6.vite-plugin","i-custom-vite",{"title":197,"path":198,"stem":199,"icon":200},"Auto-Redaction","\u002Fcore-concepts\u002Fredaction","3.core-concepts\u002F7.redaction","i-lucide-eye-off",{"title":202,"path":203,"stem":204,"children":205,"page":34},"Frameworks","\u002Fframeworks","4.frameworks",[206,210,215,220,225,230,235,240,245,250,255,260,265,270,274,279,284],{"title":41,"path":207,"stem":208,"icon":209},"\u002Fframeworks\u002Foverview","4.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":211,"path":212,"stem":213,"icon":214},"Nuxt","\u002Fframeworks\u002Fnuxt","4.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":216,"path":217,"stem":218,"icon":219},"Next.js","\u002Fframeworks\u002Fnextjs","4.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":221,"path":222,"stem":223,"icon":224},"SvelteKit","\u002Fframeworks\u002Fsveltekit","4.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":226,"path":227,"stem":228,"icon":229},"Nitro","\u002Fframeworks\u002Fnitro","4.frameworks\u002F04.nitro","i-custom-nitro",{"title":231,"path":232,"stem":233,"icon":234},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","4.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":236,"path":237,"stem":238,"icon":239},"NestJS","\u002Fframeworks\u002Fnestjs","4.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":241,"path":242,"stem":243,"icon":244},"Express","\u002Fframeworks\u002Fexpress","4.frameworks\u002F07.express","i-simple-icons-express",{"title":246,"path":247,"stem":248,"icon":249},"Hono","\u002Fframeworks\u002Fhono","4.frameworks\u002F08.hono","i-simple-icons-hono",{"title":251,"path":252,"stem":253,"icon":254},"Fastify","\u002Fframeworks\u002Ffastify","4.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":256,"path":257,"stem":258,"icon":259},"Elysia","\u002Fframeworks\u002Felysia","4.frameworks\u002F10.elysia","i-custom-elysia",{"title":261,"path":262,"stem":263,"icon":264},"React Router","\u002Fframeworks\u002Freact-router","4.frameworks\u002F11.react-router","i-custom-reactrouter",{"title":266,"path":267,"stem":268,"icon":269},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","4.frameworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":271,"path":272,"stem":273,"icon":183},"Standalone","\u002Fframeworks\u002Fstandalone","4.frameworks\u002F13.standalone",{"title":275,"path":276,"stem":277,"icon":278},"Astro","\u002Fframeworks\u002Fastro","4.frameworks\u002F14.astro","i-simple-icons-astro",{"title":280,"path":281,"stem":282,"icon":283},"AWS Lambda","\u002Fframeworks\u002Faws-lambda","4.frameworks\u002F16.aws-lambda","i-custom-lambda",{"title":285,"path":286,"stem":287,"icon":288},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","4.frameworks\u002F17.custom-integration","i-lucide-puzzle",{"title":290,"path":291,"stem":292,"children":293,"page":34},"Build on top","\u002Fbuild-on-top","5.build-on-top",[294,297,302,307,312,316,321,326,330,334,338,342,347],{"title":41,"path":295,"stem":296,"icon":54},"\u002Fbuild-on-top\u002Foverview","5.build-on-top\u002F0.overview",{"title":298,"path":299,"stem":300,"icon":301},"In-process stream","\u002Fbuild-on-top\u002Fin-process-stream","5.build-on-top\u002F1.in-process-stream","i-lucide-radio-tower",{"title":303,"path":304,"stem":305,"icon":306},"Fanout","\u002Fbuild-on-top\u002Ffanout-and-multi-drain","5.build-on-top\u002F10.fanout-and-multi-drain","i-lucide-share-2",{"title":308,"path":309,"stem":310,"icon":311},"Identity headers","\u002Fbuild-on-top\u002Fidentity-headers","5.build-on-top\u002F11.identity-headers","i-lucide-fingerprint",{"title":313,"path":314,"stem":315,"icon":288},"Custom framework","\u002Fbuild-on-top\u002Fcustom-framework","5.build-on-top\u002F12.custom-framework",{"title":317,"path":318,"stem":319,"icon":320},"Stream server","\u002Fbuild-on-top\u002Fstream-server","5.build-on-top\u002F2.stream-server","i-lucide-radio",{"title":322,"path":323,"stem":324,"icon":325},"FS reader","\u002Fbuild-on-top\u002Ffs-reader","5.build-on-top\u002F3.fs-reader","i-lucide-folder-search",{"title":156,"path":327,"stem":328,"icon":329},"\u002Fbuild-on-top\u002Fconsumer-recipes","5.build-on-top\u002F4.consumer-recipes","i-lucide-chef-hat",{"title":331,"path":332,"stem":333,"icon":288},"Plugins","\u002Fbuild-on-top\u002Fplugins","5.build-on-top\u002F5.plugins",{"title":335,"path":336,"stem":337,"icon":28},"Custom enrichers","\u002Fbuild-on-top\u002Fcustom-enrichers","5.build-on-top\u002F6.custom-enrichers",{"title":339,"path":340,"stem":341,"icon":178},"Tail sampling","\u002Fbuild-on-top\u002Ftail-sampling","5.build-on-top\u002F7.tail-sampling",{"title":343,"path":344,"stem":345,"icon":346},"Custom drains","\u002Fbuild-on-top\u002Fcustom-drains","5.build-on-top\u002F8.custom-drains","i-lucide-code-2",{"title":348,"path":349,"stem":350,"icon":351},"Drain pipeline","\u002Fbuild-on-top\u002Fdrain-pipeline","5.build-on-top\u002F9.drain-pipeline","i-lucide-workflow",{"title":353,"path":354,"stem":355,"children":356,"page":34},"Adapters","\u002Fadapters","6.adapters",[357,360,400,415],{"title":41,"path":358,"stem":359,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":361,"path":362,"stem":363,"children":364,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[365,370,375,380,385,390,395],{"title":366,"path":367,"stem":368,"icon":369},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":371,"path":372,"stem":373,"icon":374},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":376,"path":377,"stem":378,"icon":379},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":381,"path":382,"stem":383,"icon":384},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":386,"path":387,"stem":388,"icon":389},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":391,"path":392,"stem":393,"icon":394},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":396,"path":397,"stem":398,"icon":399},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":401,"path":402,"stem":403,"children":404,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[405,410],{"title":406,"path":407,"stem":408,"icon":409},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":411,"path":412,"stem":413,"icon":414},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":416,"path":417,"stem":418,"children":419,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[420,424,429,433],{"title":421,"path":422,"stem":423,"icon":351},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline",{"title":425,"path":426,"stem":427,"icon":428},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":430,"path":431,"stem":432,"icon":83},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":434,"path":435,"stem":436,"icon":437},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":439,"path":440,"stem":441,"children":442,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[443,446,450],{"title":41,"path":444,"stem":445,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":447,"path":448,"stem":449,"icon":288},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":451,"path":452,"stem":453,"icon":83},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":455,"title":10,"body":456,"description":1564,"extension":1565,"links":1566,"meta":1575,"navigation":1576,"path":11,"seo":1577,"stem":12,"__hash__":1578},"docs\u002F1.getting-started\u002F1.introduction.md",{"type":457,"value":458,"toc":1553},"minimark",[459,472,489,494,497,502,524,536,540,543,606,613,617,620,624,630,772,775,778,1201,1204,1207,1219,1472,1476,1483,1506,1516,1520,1549],[460,461,462,466,467,471],"p",{},[463,464,465],"strong",{},"evlog"," is a modern TypeScript logger built for everything you ship. It gives you simple structured logs (a drop-in for ",[468,469,470],"code",{},"console.log",", pino, or consola), wide events that accumulate context across an operation, and structured errors that explain why they happened — all in one API, all behind the same drain pipeline. Use it in CLIs, libraries, background jobs, edge workers, and HTTP handlers without switching loggers.",[460,473,474,475,482,483,488],{},"Inspired by ",[476,477,481],"a",{"href":478,"rel":479},"https:\u002F\u002Floggingsucks.com\u002F",[480],"nofollow","Logging Sucks"," by ",[476,484,487],{"href":485,"rel":486},"https:\u002F\u002Fx.com\u002Fboristane",[480],"Boris Tane",".",[490,491,493],"h2",{"id":492},"philosophy","Philosophy",[460,495,496],{},"Traditional logging is broken. Your logs are scattered across dozens of files. Each request generates 10+ log lines. When something goes wrong, you're left grep-ing through noise hoping to find signal.",[460,498,499,501],{},[463,500,465],{}," takes a different approach:",[503,504,505,513,516,519],"card-group",{},[506,507,509,510,512],"card",{"icon":49,"title":508},"Structured Logging","Replace ",[468,511,470],{}," with typed, structured events that flow through a drain pipeline. Same level filtering, redaction, and pretty\u002FJSON output as pino or consola.",[506,514,515],{"icon":54,"title":51},"Accumulate context over any unit of work (a request, script, or job) and emit once. The two modes coexist — neither is an upgrade of the other.",[506,517,518],{"icon":59,"title":56},"Errors that explain why they occurred and how to fix them.",[506,520,523],{"icon":521,"title":522},"i-lucide-palette","Pretty for Dev","Human-readable in development, machine-parseable JSON in production.",[525,526,528,529,532,533,535],"callout",{"color":527,"icon":428},"info","Not running an HTTP framework? See ",[476,530,531],{"href":272},"Standalone TypeScript"," for scripts, workers, and CLIs, and ",[476,534,266],{"href":267}," for the edge runtime.",[490,537,539],{"id":538},"why-evlog-over-pino-winston-or-consola","Why evlog over pino, winston, or consola",[460,541,542],{},"evlog is a fully-featured general-purpose logger that happens to also do wide events. Concretely:",[544,545,546,557,575,592],"ul",{},[547,548,549,552,553,556],"li",{},[463,550,551],{},"Zero transitive dependencies"," and ~6 kB gzip — nothing to audit, nothing that breaks on the next Node LTS. Benchmarked at ",[476,554,555],{"href":189},"~3 µs\u002Frequest",", 7.7x faster than pino in the wide event pattern (1 event vs 4 log lines) and competitive on every other path.",[547,558,559,562,563,566,567,570,571,574],{},[463,560,561],{},"Same API in every context"," — scripts, frameworks, edge runtimes, browser, library code. No ",[468,564,565],{},"pino-http"," vs ",[468,568,569],{},"pino"," split, no separate ",[468,572,573],{},"consola"," reporters per environment.",[547,576,577,591],{},[463,578,579,580,583,584,583,587,590],{},"Structured errors with ",[468,581,582],{},"why"," \u002F ",[468,585,586],{},"fix",[468,588,589],{},"link"," built in"," — your error toast finally tells users what went wrong and what to do, your on-call stops reverse-engineering stack traces.",[547,593,594,597,598,601,602,605],{},[463,595,596],{},"Wide events as a free upgrade path"," — when you need to correlate context across an operation, the same logger gives you ",[468,599,600],{},"log.set"," + ",[468,603,604],{},"log.emit"," instead of stitching log lines together later.",[460,607,608,609,612],{},"See the full ",[476,610,611],{"href":31},"feature comparison"," (parity matrix, honest gaps, and migration snippets) for a side-by-side with pino, winston, and consola.",[490,614,616],{"id":615},"three-ways-to-log","Three Ways to Log",[460,618,619],{},"evlog provides three APIs for different contexts. You can use all three in the same project.",[621,622,46],"h3",{"id":623},"simple-logging",[460,625,626,627,629],{},"Fire-and-forget structured logs. Replace ",[468,628,470],{},", consola, or pino:",[631,632,638],"pre",{"className":633,"code":634,"filename":635,"language":636,"meta":637,"style":637},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { log } from 'evlog'\n\nlog.info('auth', 'User logged in')\nlog.error({ action: 'payment', error: 'card_declined', userId: 42 })\n","src\u002Findex.ts","typescript","",[468,639,640,672,679,714],{"__ignoreMap":637},[641,642,645,649,653,657,660,663,666,669],"span",{"class":643,"line":644},"line",1,[641,646,648],{"class":647},"s7zQu","import",[641,650,652],{"class":651},"sMK4o"," {",[641,654,656],{"class":655},"sTEyZ"," log",[641,658,659],{"class":651}," }",[641,661,662],{"class":647}," from",[641,664,665],{"class":651}," '",[641,667,465],{"class":668},"sfazB",[641,670,671],{"class":651},"'\n",[641,673,675],{"class":643,"line":674},2,[641,676,678],{"emptyLinePlaceholder":677},true,"\n",[641,680,682,685,687,690,693,696,699,701,704,706,709,711],{"class":643,"line":681},3,[641,683,684],{"class":655},"log",[641,686,488],{"class":651},[641,688,527],{"class":689},"s2Zo4",[641,691,692],{"class":655},"(",[641,694,695],{"class":651},"'",[641,697,698],{"class":668},"auth",[641,700,695],{"class":651},[641,702,703],{"class":651},",",[641,705,665],{"class":651},[641,707,708],{"class":668},"User logged in",[641,710,695],{"class":651},[641,712,713],{"class":655},")\n",[641,715,717,719,721,724,726,729,733,736,738,741,743,745,748,750,752,755,757,759,762,764,768,770],{"class":643,"line":716},4,[641,718,684],{"class":655},[641,720,488],{"class":651},[641,722,723],{"class":689},"error",[641,725,692],{"class":655},[641,727,728],{"class":651},"{",[641,730,732],{"class":731},"swJcz"," action",[641,734,735],{"class":651},":",[641,737,665],{"class":651},[641,739,740],{"class":668},"payment",[641,742,695],{"class":651},[641,744,703],{"class":651},[641,746,747],{"class":731}," error",[641,749,735],{"class":651},[641,751,665],{"class":651},[641,753,754],{"class":668},"card_declined",[641,756,695],{"class":651},[641,758,703],{"class":651},[641,760,761],{"class":731}," userId",[641,763,735],{"class":651},[641,765,767],{"class":766},"sbssI"," 42",[641,769,659],{"class":651},[641,771,713],{"class":655},[621,773,51],{"id":774},"wide-events",[460,776,777],{},"Accumulate context progressively over any operation, then emit a single comprehensive event:",[779,780,781,914,1044],"code-group",{},[631,782,785],{"className":633,"code":783,"filename":784,"language":636,"meta":637,"style":637},"import { createLogger } from 'evlog'\n\nconst log = createLogger({ jobId: 'sync-001', queue: 'emails' })\nlog.set({ batch: { size: 50, processed: 50 } })\nlog.emit()\n","scripts\u002Fsync-job.ts",[468,786,787,806,810,858,901],{"__ignoreMap":637},[641,788,789,791,793,796,798,800,802,804],{"class":643,"line":644},[641,790,648],{"class":647},[641,792,652],{"class":651},[641,794,795],{"class":655}," createLogger",[641,797,659],{"class":651},[641,799,662],{"class":647},[641,801,665],{"class":651},[641,803,465],{"class":668},[641,805,671],{"class":651},[641,807,808],{"class":643,"line":674},[641,809,678],{"emptyLinePlaceholder":677},[641,811,812,816,819,822,824,826,828,831,833,835,838,840,842,845,847,849,852,854,856],{"class":643,"line":681},[641,813,815],{"class":814},"spNyl","const",[641,817,818],{"class":655}," log ",[641,820,821],{"class":651},"=",[641,823,795],{"class":689},[641,825,692],{"class":655},[641,827,728],{"class":651},[641,829,830],{"class":731}," jobId",[641,832,735],{"class":651},[641,834,665],{"class":651},[641,836,837],{"class":668},"sync-001",[641,839,695],{"class":651},[641,841,703],{"class":651},[641,843,844],{"class":731}," queue",[641,846,735],{"class":651},[641,848,665],{"class":651},[641,850,851],{"class":668},"emails",[641,853,695],{"class":651},[641,855,659],{"class":651},[641,857,713],{"class":655},[641,859,860,862,864,867,869,871,874,876,878,881,883,886,888,891,893,895,897,899],{"class":643,"line":716},[641,861,684],{"class":655},[641,863,488],{"class":651},[641,865,866],{"class":689},"set",[641,868,692],{"class":655},[641,870,728],{"class":651},[641,872,873],{"class":731}," batch",[641,875,735],{"class":651},[641,877,652],{"class":651},[641,879,880],{"class":731}," size",[641,882,735],{"class":651},[641,884,885],{"class":766}," 50",[641,887,703],{"class":651},[641,889,890],{"class":731}," processed",[641,892,735],{"class":651},[641,894,885],{"class":766},[641,896,659],{"class":651},[641,898,659],{"class":651},[641,900,713],{"class":655},[641,902,904,906,908,911],{"class":643,"line":903},5,[641,905,684],{"class":655},[641,907,488],{"class":651},[641,909,910],{"class":689},"emit",[641,912,913],{"class":655},"()\n",[631,915,918],{"className":633,"code":916,"filename":917,"language":636,"meta":637,"style":637},"import { createRequestLogger } from 'evlog'\n\nconst log = createRequestLogger({ method: 'POST', path: '\u002Fapi\u002Fcheckout' })\nlog.set({ user: { id: 1, plan: 'pro' } })\nlog.emit()\n","src\u002Fworker.ts",[468,919,920,939,943,987,1034],{"__ignoreMap":637},[641,921,922,924,926,929,931,933,935,937],{"class":643,"line":644},[641,923,648],{"class":647},[641,925,652],{"class":651},[641,927,928],{"class":655}," createRequestLogger",[641,930,659],{"class":651},[641,932,662],{"class":647},[641,934,665],{"class":651},[641,936,465],{"class":668},[641,938,671],{"class":651},[641,940,941],{"class":643,"line":674},[641,942,678],{"emptyLinePlaceholder":677},[641,944,945,947,949,951,953,955,957,960,962,964,967,969,971,974,976,978,981,983,985],{"class":643,"line":681},[641,946,815],{"class":814},[641,948,818],{"class":655},[641,950,821],{"class":651},[641,952,928],{"class":689},[641,954,692],{"class":655},[641,956,728],{"class":651},[641,958,959],{"class":731}," method",[641,961,735],{"class":651},[641,963,665],{"class":651},[641,965,966],{"class":668},"POST",[641,968,695],{"class":651},[641,970,703],{"class":651},[641,972,973],{"class":731}," path",[641,975,735],{"class":651},[641,977,665],{"class":651},[641,979,980],{"class":668},"\u002Fapi\u002Fcheckout",[641,982,695],{"class":651},[641,984,659],{"class":651},[641,986,713],{"class":655},[641,988,989,991,993,995,997,999,1002,1004,1006,1009,1011,1014,1016,1019,1021,1023,1026,1028,1030,1032],{"class":643,"line":716},[641,990,684],{"class":655},[641,992,488],{"class":651},[641,994,866],{"class":689},[641,996,692],{"class":655},[641,998,728],{"class":651},[641,1000,1001],{"class":731}," user",[641,1003,735],{"class":651},[641,1005,652],{"class":651},[641,1007,1008],{"class":731}," id",[641,1010,735],{"class":651},[641,1012,1013],{"class":766}," 1",[641,1015,703],{"class":651},[641,1017,1018],{"class":731}," plan",[641,1020,735],{"class":651},[641,1022,665],{"class":651},[641,1024,1025],{"class":668},"pro",[641,1027,695],{"class":651},[641,1029,659],{"class":651},[641,1031,659],{"class":651},[641,1033,713],{"class":655},[641,1035,1036,1038,1040,1042],{"class":643,"line":903},[641,1037,684],{"class":655},[641,1039,488],{"class":651},[641,1041,910],{"class":689},[641,1043,913],{"class":655},[631,1045,1048],{"className":633,"code":1046,"filename":1047,"language":636,"meta":637,"style":637},"import { useLogger } from 'evlog'\n\nexport default defineEventHandler(async (event) => {\n  const log = useLogger(event)\n  log.set({ user: { id: 1, plan: 'pro' } })\n  return { success: true }\n  \u002F\u002F auto-emitted on response end\n})\n","server\u002Fapi\u002Fcheckout.post.ts",[468,1049,1050,1069,1073,1105,1123,1166,1186,1193],{"__ignoreMap":637},[641,1051,1052,1054,1056,1059,1061,1063,1065,1067],{"class":643,"line":644},[641,1053,648],{"class":647},[641,1055,652],{"class":651},[641,1057,1058],{"class":655}," useLogger",[641,1060,659],{"class":651},[641,1062,662],{"class":647},[641,1064,665],{"class":651},[641,1066,465],{"class":668},[641,1068,671],{"class":651},[641,1070,1071],{"class":643,"line":674},[641,1072,678],{"emptyLinePlaceholder":677},[641,1074,1075,1078,1081,1084,1086,1089,1092,1096,1099,1102],{"class":643,"line":681},[641,1076,1077],{"class":647},"export",[641,1079,1080],{"class":647}," default",[641,1082,1083],{"class":689}," defineEventHandler",[641,1085,692],{"class":655},[641,1087,1088],{"class":814},"async",[641,1090,1091],{"class":651}," (",[641,1093,1095],{"class":1094},"sHdIc","event",[641,1097,1098],{"class":651},")",[641,1100,1101],{"class":814}," =>",[641,1103,1104],{"class":651}," {\n",[641,1106,1107,1110,1112,1115,1117,1119,1121],{"class":643,"line":716},[641,1108,1109],{"class":814},"  const",[641,1111,656],{"class":655},[641,1113,1114],{"class":651}," =",[641,1116,1058],{"class":689},[641,1118,692],{"class":731},[641,1120,1095],{"class":655},[641,1122,713],{"class":731},[641,1124,1125,1128,1130,1132,1134,1136,1138,1140,1142,1144,1146,1148,1150,1152,1154,1156,1158,1160,1162,1164],{"class":643,"line":903},[641,1126,1127],{"class":655},"  log",[641,1129,488],{"class":651},[641,1131,866],{"class":689},[641,1133,692],{"class":731},[641,1135,728],{"class":651},[641,1137,1001],{"class":731},[641,1139,735],{"class":651},[641,1141,652],{"class":651},[641,1143,1008],{"class":731},[641,1145,735],{"class":651},[641,1147,1013],{"class":766},[641,1149,703],{"class":651},[641,1151,1018],{"class":731},[641,1153,735],{"class":651},[641,1155,665],{"class":651},[641,1157,1025],{"class":668},[641,1159,695],{"class":651},[641,1161,659],{"class":651},[641,1163,659],{"class":651},[641,1165,713],{"class":731},[641,1167,1169,1172,1174,1177,1179,1183],{"class":643,"line":1168},6,[641,1170,1171],{"class":647},"  return",[641,1173,652],{"class":651},[641,1175,1176],{"class":731}," success",[641,1178,735],{"class":651},[641,1180,1182],{"class":1181},"sfNiH"," true",[641,1184,1185],{"class":651}," }\n",[641,1187,1189],{"class":643,"line":1188},7,[641,1190,1192],{"class":1191},"sHwdD","  \u002F\u002F auto-emitted on response end\n",[641,1194,1196,1199],{"class":643,"line":1195},8,[641,1197,1198],{"class":651},"}",[641,1200,713],{"class":655},[460,1202,1203],{},"One log, all context. Everything you need to understand what happened.",[621,1205,56],{"id":1206},"structured-errors",[460,1208,1209,1210,1212,1213,1215,1216,1218],{},"Errors with actionable context: ",[468,1211,582],{}," it happened, how to ",[468,1214,586],{}," it, and a ",[468,1217,589],{}," to docs:",[779,1220,1221,1345],{},[631,1222,1224],{"className":633,"code":1223,"filename":1047,"language":636,"meta":637,"style":637},"import { createError } from 'evlog'\n\nthrow createError({\n  message: 'Payment failed',\n  status: 402,\n  why: 'Card declined by issuer (insufficient funds)',\n  fix: 'Try a different payment method or contact your bank',\n  link: 'https:\u002F\u002Fdocs.example.com\u002Fpayments\u002Fdeclined',\n})\n",[468,1225,1226,1245,1249,1261,1278,1290,1306,1322,1338],{"__ignoreMap":637},[641,1227,1228,1230,1232,1235,1237,1239,1241,1243],{"class":643,"line":644},[641,1229,648],{"class":647},[641,1231,652],{"class":651},[641,1233,1234],{"class":655}," createError",[641,1236,659],{"class":651},[641,1238,662],{"class":647},[641,1240,665],{"class":651},[641,1242,465],{"class":668},[641,1244,671],{"class":651},[641,1246,1247],{"class":643,"line":674},[641,1248,678],{"emptyLinePlaceholder":677},[641,1250,1251,1254,1256,1258],{"class":643,"line":681},[641,1252,1253],{"class":647},"throw",[641,1255,1234],{"class":689},[641,1257,692],{"class":655},[641,1259,1260],{"class":651},"{\n",[641,1262,1263,1266,1268,1270,1273,1275],{"class":643,"line":716},[641,1264,1265],{"class":731},"  message",[641,1267,735],{"class":651},[641,1269,665],{"class":651},[641,1271,1272],{"class":668},"Payment failed",[641,1274,695],{"class":651},[641,1276,1277],{"class":651},",\n",[641,1279,1280,1283,1285,1288],{"class":643,"line":903},[641,1281,1282],{"class":731},"  status",[641,1284,735],{"class":651},[641,1286,1287],{"class":766}," 402",[641,1289,1277],{"class":651},[641,1291,1292,1295,1297,1299,1302,1304],{"class":643,"line":1168},[641,1293,1294],{"class":731},"  why",[641,1296,735],{"class":651},[641,1298,665],{"class":651},[641,1300,1301],{"class":668},"Card declined by issuer (insufficient funds)",[641,1303,695],{"class":651},[641,1305,1277],{"class":651},[641,1307,1308,1311,1313,1315,1318,1320],{"class":643,"line":1188},[641,1309,1310],{"class":731},"  fix",[641,1312,735],{"class":651},[641,1314,665],{"class":651},[641,1316,1317],{"class":668},"Try a different payment method or contact your bank",[641,1319,695],{"class":651},[641,1321,1277],{"class":651},[641,1323,1324,1327,1329,1331,1334,1336],{"class":643,"line":1195},[641,1325,1326],{"class":731},"  link",[641,1328,735],{"class":651},[641,1330,665],{"class":651},[641,1332,1333],{"class":668},"https:\u002F\u002Fdocs.example.com\u002Fpayments\u002Fdeclined",[641,1335,695],{"class":651},[641,1337,1277],{"class":651},[641,1339,1341,1343],{"class":643,"line":1340},9,[641,1342,1198],{"class":651},[641,1344,713],{"class":655},[631,1346,1351],{"className":1347,"code":1348,"filename":1349,"language":1350,"meta":637,"style":637},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"statusCode\": 402,\n  \"message\": \"Payment failed\",\n  \"data\": {\n    \"why\": \"Card declined by issuer (insufficient funds)\",\n    \"fix\": \"Try a different payment method or contact your bank\",\n    \"link\": \"https:\u002F\u002Fdocs.example.com\u002Fpayments\u002Fdeclined\"\n  }\n}\n","Response","json",[468,1352,1353,1357,1374,1394,1407,1427,1445,1462,1467],{"__ignoreMap":637},[641,1354,1355],{"class":643,"line":644},[641,1356,1260],{"class":651},[641,1358,1359,1362,1365,1368,1370,1372],{"class":643,"line":674},[641,1360,1361],{"class":651},"  \"",[641,1363,1364],{"class":814},"statusCode",[641,1366,1367],{"class":651},"\"",[641,1369,735],{"class":651},[641,1371,1287],{"class":766},[641,1373,1277],{"class":651},[641,1375,1376,1378,1381,1383,1385,1388,1390,1392],{"class":643,"line":681},[641,1377,1361],{"class":651},[641,1379,1380],{"class":814},"message",[641,1382,1367],{"class":651},[641,1384,735],{"class":651},[641,1386,1387],{"class":651}," \"",[641,1389,1272],{"class":668},[641,1391,1367],{"class":651},[641,1393,1277],{"class":651},[641,1395,1396,1398,1401,1403,1405],{"class":643,"line":716},[641,1397,1361],{"class":651},[641,1399,1400],{"class":814},"data",[641,1402,1367],{"class":651},[641,1404,735],{"class":651},[641,1406,1104],{"class":651},[641,1408,1409,1412,1415,1417,1419,1421,1423,1425],{"class":643,"line":903},[641,1410,1411],{"class":651},"    \"",[641,1413,582],{"class":1414},"sBMFI",[641,1416,1367],{"class":651},[641,1418,735],{"class":651},[641,1420,1387],{"class":651},[641,1422,1301],{"class":668},[641,1424,1367],{"class":651},[641,1426,1277],{"class":651},[641,1428,1429,1431,1433,1435,1437,1439,1441,1443],{"class":643,"line":1168},[641,1430,1411],{"class":651},[641,1432,586],{"class":1414},[641,1434,1367],{"class":651},[641,1436,735],{"class":651},[641,1438,1387],{"class":651},[641,1440,1317],{"class":668},[641,1442,1367],{"class":651},[641,1444,1277],{"class":651},[641,1446,1447,1449,1451,1453,1455,1457,1459],{"class":643,"line":1188},[641,1448,1411],{"class":651},[641,1450,589],{"class":1414},[641,1452,1367],{"class":651},[641,1454,735],{"class":651},[641,1456,1387],{"class":651},[641,1458,1333],{"class":668},[641,1460,1461],{"class":651},"\"\n",[641,1463,1464],{"class":643,"line":1195},[641,1465,1466],{"class":651},"  }\n",[641,1468,1469],{"class":643,"line":1340},[641,1470,1471],{"class":651},"}\n",[490,1473,1475],{"id":1474},"why-context-matters","Why Context Matters",[460,1477,1478,1479,1482],{},"We're entering an era where AI agents build, debug, and maintain applications. These agents need ",[463,1480,1481],{},"structured context"," to work effectively:",[544,1484,1485,1492,1499],{},[547,1486,1487,1491],{},[463,1488,1489],{},[468,1490,582],{},": The root cause, so the agent understands what went wrong",[547,1493,1494,1498],{},[463,1495,1496],{},[468,1497,586],{},": An actionable solution the agent can suggest or apply",[547,1500,1501,1505],{},[463,1502,1503],{},[468,1504,589],{},": Documentation for complex issues",[460,1507,1508,1509,1511,1512,1515],{},"Traditional ",[468,1510,470],{}," and generic ",[468,1513,1514],{},"throw new Error()"," provide no actionable context. evlog's structured output is designed for both humans and AI to parse and act on.",[490,1517,1519],{"id":1518},"next-steps","Next Steps",[544,1521,1522,1527,1532,1538,1544],{},[547,1523,1524,1526],{},[476,1525,15],{"href":16}," - Install evlog in your project",[547,1528,1529,1531],{},[476,1530,20],{"href":21}," - Get up and running in minutes",[547,1533,1534,1537],{},[476,1535,1536],{"href":42},"Logging Overview"," - Understand the three logging modes in depth",[547,1539,1540,1543],{},[476,1541,1542],{"href":31},"evlog vs pino, winston, consola"," - Feature parity, honest gaps, and migration snippets",[547,1545,1546,1548],{},[476,1547,531],{"href":272}," — scripts, workers, libraries without a web framework",[1550,1551,1552],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":637,"searchDepth":674,"depth":674,"links":1554},[1555,1556,1557,1562,1563],{"id":492,"depth":674,"text":493},{"id":538,"depth":674,"text":539},{"id":615,"depth":674,"text":616,"children":1558},[1559,1560,1561],{"id":623,"depth":681,"text":46},{"id":774,"depth":681,"text":51},{"id":1206,"depth":681,"text":56},{"id":1474,"depth":674,"text":1475},{"id":1518,"depth":674,"text":1519},"A modern TypeScript logger built for everything you ship. Simple structured logs, wide events, and structured errors in one API — drop-in for console.log, pino, or consola.","md",[1567,1570],{"label":20,"icon":23,"to":21,"color":1568,"variant":1569},"neutral","subtle",{"label":1571,"icon":1572,"to":1573,"target":1574,"color":1568,"variant":1569},"GitHub","i-simple-icons-github","https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog","_blank",{},{"icon":13},{"title":10,"description":1564},"ggo4Lnufs_klF2bzb0k9vN7ZaI4_KoFJlxqtYPeZxuw",[1580,1581],null,{"title":15,"path":16,"stem":17,"description":1582,"icon":18,"children":-1},"Install evlog in your TypeScript project. Supports Nuxt, Next.js, SvelteKit, Hono, Express, Fastify, Elysia, NestJS, and standalone scripts.",1778340158241]