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