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