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