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