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