[{"data":1,"prerenderedAt":3015},["ShallowReactive",2],{"navigation_docs":3,"-core-concepts-lifecycle":421,"-core-concepts-lifecycle-surround":3010},[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":165,"body":423,"description":2999,"extension":3000,"links":3001,"meta":3006,"navigation":3007,"path":166,"seo":3008,"stem":167,"__hash__":3009},"docs\u002F3.core-concepts\u002F0.lifecycle.md",{"type":424,"value":425,"toc":2976},"minimark",[426,430,433,438,583,621,625,631,942,946,951,961,967,1065,1069,1076,1145,1151,1155,1161,1372,1378,1382,1385,1425,1428,1435,1447,1555,1561,1693,1703,1707,1710,1717,1786,1809,1812,1816,1822,2070,2073,2080,2083,2163,2319,2326,2333,2343,2426,2433,2437,2502,2506,2513,2624,2628,2634,2667,2677,2681,2688,2736,2946,2950,2972],[427,428,429],"p",{},"evlog events follow a pipeline from creation to delivery. The pipeline differs slightly depending on which logging mode you use, but the core stages (emit, sample, enrich, drain) are shared.",[431,432],"lifecycle-flow",{},[434,435,437],"h2",{"id":436},"overview-by-mode","Overview by Mode",[439,440,441,470],"table",{},[442,443,444],"thead",{},[445,446,447,451,458,467],"tr",{},[448,449,450],"th",{},"Stage",[448,452,453,457],{},[454,455,456],"code",{},"log"," (simple)",[448,459,460,463,464],{},[454,461,462],{},"createLogger"," \u002F ",[454,465,466],{},"createRequestLogger",[448,468,469],{},"Framework middleware",[471,472,473,497,521,540,555,570],"tbody",{},[445,474,475,482,485,494],{},[476,477,478],"td",{},[479,480,481],"strong",{},"Create",[476,483,484],{},"Implicit per call",[476,486,487,490,491],{},[454,488,489],{},"createLogger({...})"," or ",[454,492,493],{},"createRequestLogger({...})",[476,495,496],{},"Auto on request start",[445,498,499,504,507,513],{},[476,500,501],{},[479,502,503],{},"Accumulate",[476,505,506],{},"N\u002FA (single call)",[476,508,509,512],{},[454,510,511],{},"log.set()"," multiple times",[476,514,515,517,518],{},[454,516,511],{}," via ",[454,519,520],{},"useLogger(event)",[445,522,523,528,531,537],{},[476,524,525],{},[479,526,527],{},"Emit",[476,529,530],{},"Immediate",[476,532,533,534],{},"Manual ",[454,535,536],{},"log.emit()",[476,538,539],{},"Auto on response end",[445,541,542,547,550,553],{},[476,543,544],{},[479,545,546],{},"Sample",[476,548,549],{},"Head sampling only",[476,551,552],{},"Head + tail sampling",[476,554,552],{},[445,556,557,562,565,567],{},[476,558,559],{},[479,560,561],{},"Enrich",[476,563,564],{},"Via global drain",[476,566,564],{},[476,568,569],{},"Via hooks or callbacks",[445,571,572,577,579,581],{},[476,573,574],{},[479,575,576],{},"Drain",[476,578,564],{},[476,580,564],{},[476,582,569],{},[427,584,585,586,591,592,595,596,463,599,463,602,463,605,608,609,614,615,620],{},"After ",[479,587,588],{},[454,589,590],{},"emit"," (including when sampling returns no output), the request logger is ",[479,593,594],{},"sealed",": later ",[454,597,598],{},"set",[454,600,601],{},"error",[454,603,604],{},"info",[454,606,607],{},"warn"," calls are ignored with a console warning. For background work that needs its own event, use ",[479,610,611],{},[454,612,613],{},"log.fork()"," where your integration supports it. See ",[616,617,619],"a",{"href":618},"\u002Flogging\u002Fwide-events#after-emit-sealing-and-background-work","Wide events — After emit",".",[434,622,624],{"id":623},"request-logging-pipeline","Request Logging Pipeline",[427,626,627,628,630],{},"For framework-managed request logging, every request follows this pipeline. The middleware creates the logger and ",[454,629,520],{}," retrieves it:",[632,633,638],"pre",{"className":634,"code":635,"language":636,"meta":637,"style":637},"language-mdc shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","   Request In\n       │\n       ▼\n  ┌──────────┐     Route excluded?\n  │  Filter  │────── yes ──▶ skip (no logging)\n  └──────────┘\n       │ no\n       ▼\n  ┌──────────────────┐\n  │  Create Logger   │  requestId, method, path, startTime\n  └──────────────────┘\n       │\n       ▼\n  ┌──────────────────┐\n  │  Handler runs    │  log.set() accumulates context\n  │                  │  log.error() records errors\n  └──────────────────┘\n       │\n       ▼\n  ┌──────────────────┐\n  │  Request ends    │  status + duration computed\n  └──────────────────┘\n       │\n       ▼\n  ┌──────────────────┐\n  │  Tail Sampling   │  evlog:emit:keep hook\n  │  (keep?)         │  force-keep based on outcome\n  └──────────────────┘\n       │\n       ▼\n  ┌──────────────────┐\n  │  Head Sampling   │  random % per level\n  │  (sample?)       │  skipped if tail said \"keep\"\n  └──────────────────┘\n       │ sampled out? ──▶ discard (no output)\n       │\n       ▼\n  ┌──────────────────┐\n  │  Emit            │  WideEvent built + console output\n  └──────────────────┘\n       │\n       ▼\n  ┌──────────────────┐\n  │  Enrich          │  evlog:enrich hook\n  │                  │  user-agent, geo, trace, custom\n  └──────────────────┘\n       │\n       ▼\n  ┌──────────────────┐\n  │  Drain           │  evlog:drain hook\n  │                  │  Axiom, OTLP, Sentry, custom\n  └──────────────────┘\n       │\n       ▼\n   Done\n","mdc","",[454,639,640,649,655,661,667,673,679,685,690,696,702,708,713,718,723,729,735,740,745,750,755,761,766,771,776,781,787,793,798,803,808,813,819,825,830,836,841,846,851,857,862,867,872,877,883,889,894,899,904,909,915,921,926,931,936],{"__ignoreMap":637},[641,642,645],"span",{"class":643,"line":644},"line",1,[641,646,648],{"class":647},"sTEyZ","   Request In\n",[641,650,652],{"class":643,"line":651},2,[641,653,654],{"class":647},"       │\n",[641,656,658],{"class":643,"line":657},3,[641,659,660],{"class":647},"       ▼\n",[641,662,664],{"class":643,"line":663},4,[641,665,666],{"class":647},"  ┌──────────┐     Route excluded?\n",[641,668,670],{"class":643,"line":669},5,[641,671,672],{"class":647},"  │  Filter  │────── yes ──▶ skip (no logging)\n",[641,674,676],{"class":643,"line":675},6,[641,677,678],{"class":647},"  └──────────┘\n",[641,680,682],{"class":643,"line":681},7,[641,683,684],{"class":647},"       │ no\n",[641,686,688],{"class":643,"line":687},8,[641,689,660],{"class":647},[641,691,693],{"class":643,"line":692},9,[641,694,695],{"class":647},"  ┌──────────────────┐\n",[641,697,699],{"class":643,"line":698},10,[641,700,701],{"class":647},"  │  Create Logger   │  requestId, method, path, startTime\n",[641,703,705],{"class":643,"line":704},11,[641,706,707],{"class":647},"  └──────────────────┘\n",[641,709,711],{"class":643,"line":710},12,[641,712,654],{"class":647},[641,714,716],{"class":643,"line":715},13,[641,717,660],{"class":647},[641,719,721],{"class":643,"line":720},14,[641,722,695],{"class":647},[641,724,726],{"class":643,"line":725},15,[641,727,728],{"class":647},"  │  Handler runs    │  log.set() accumulates context\n",[641,730,732],{"class":643,"line":731},16,[641,733,734],{"class":647},"  │                  │  log.error() records errors\n",[641,736,738],{"class":643,"line":737},17,[641,739,707],{"class":647},[641,741,743],{"class":643,"line":742},18,[641,744,654],{"class":647},[641,746,748],{"class":643,"line":747},19,[641,749,660],{"class":647},[641,751,753],{"class":643,"line":752},20,[641,754,695],{"class":647},[641,756,758],{"class":643,"line":757},21,[641,759,760],{"class":647},"  │  Request ends    │  status + duration computed\n",[641,762,764],{"class":643,"line":763},22,[641,765,707],{"class":647},[641,767,769],{"class":643,"line":768},23,[641,770,654],{"class":647},[641,772,774],{"class":643,"line":773},24,[641,775,660],{"class":647},[641,777,779],{"class":643,"line":778},25,[641,780,695],{"class":647},[641,782,784],{"class":643,"line":783},26,[641,785,786],{"class":647},"  │  Tail Sampling   │  evlog:emit:keep hook\n",[641,788,790],{"class":643,"line":789},27,[641,791,792],{"class":647},"  │  (keep?)         │  force-keep based on outcome\n",[641,794,796],{"class":643,"line":795},28,[641,797,707],{"class":647},[641,799,801],{"class":643,"line":800},29,[641,802,654],{"class":647},[641,804,806],{"class":643,"line":805},30,[641,807,660],{"class":647},[641,809,811],{"class":643,"line":810},31,[641,812,695],{"class":647},[641,814,816],{"class":643,"line":815},32,[641,817,818],{"class":647},"  │  Head Sampling   │  random % per level\n",[641,820,822],{"class":643,"line":821},33,[641,823,824],{"class":647},"  │  (sample?)       │  skipped if tail said \"keep\"\n",[641,826,828],{"class":643,"line":827},34,[641,829,707],{"class":647},[641,831,833],{"class":643,"line":832},35,[641,834,835],{"class":647},"       │ sampled out? ──▶ discard (no output)\n",[641,837,839],{"class":643,"line":838},36,[641,840,654],{"class":647},[641,842,844],{"class":643,"line":843},37,[641,845,660],{"class":647},[641,847,849],{"class":643,"line":848},38,[641,850,695],{"class":647},[641,852,854],{"class":643,"line":853},39,[641,855,856],{"class":647},"  │  Emit            │  WideEvent built + console output\n",[641,858,860],{"class":643,"line":859},40,[641,861,707],{"class":647},[641,863,865],{"class":643,"line":864},41,[641,866,654],{"class":647},[641,868,870],{"class":643,"line":869},42,[641,871,660],{"class":647},[641,873,875],{"class":643,"line":874},43,[641,876,695],{"class":647},[641,878,880],{"class":643,"line":879},44,[641,881,882],{"class":647},"  │  Enrich          │  evlog:enrich hook\n",[641,884,886],{"class":643,"line":885},45,[641,887,888],{"class":647},"  │                  │  user-agent, geo, trace, custom\n",[641,890,892],{"class":643,"line":891},46,[641,893,707],{"class":647},[641,895,897],{"class":643,"line":896},47,[641,898,654],{"class":647},[641,900,902],{"class":643,"line":901},48,[641,903,660],{"class":647},[641,905,907],{"class":643,"line":906},49,[641,908,695],{"class":647},[641,910,912],{"class":643,"line":911},50,[641,913,914],{"class":647},"  │  Drain           │  evlog:drain hook\n",[641,916,918],{"class":643,"line":917},51,[641,919,920],{"class":647},"  │                  │  Axiom, OTLP, Sentry, custom\n",[641,922,924],{"class":643,"line":923},52,[641,925,707],{"class":647},[641,927,929],{"class":643,"line":928},53,[641,930,654],{"class":647},[641,932,934],{"class":643,"line":933},54,[641,935,660],{"class":647},[641,937,939],{"class":643,"line":938},55,[641,940,941],{"class":647},"   Done\n",[434,943,945],{"id":944},"step-by-step","Step by Step",[947,948,950],"h3",{"id":949},"_1-route-filtering","1. Route Filtering",[427,952,953,954,463,957,960],{},"When a request arrives, evlog checks whether the path matches the configured ",[454,955,956],{},"include",[454,958,959],{},"exclude"," patterns. If the route is excluded, no logger is created and the request proceeds without any logging overhead.",[427,962,963,964,966],{},"By default, all routes are logged. Use ",[454,965,956],{}," to restrict logging to specific patterns:",[632,968,973],{"className":969,"code":970,"filename":971,"language":972,"meta":637,"style":637},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export default defineNuxtConfig({\n  modules: ['evlog\u002Fnuxt'],\n  evlog: {\n    include: ['\u002Fapi\u002F**'],\n  },\n})\n","nuxt.config.ts","typescript",[454,974,975,995,1022,1032,1052,1057],{"__ignoreMap":637},[641,976,977,981,984,988,991],{"class":643,"line":644},[641,978,980],{"class":979},"s7zQu","export",[641,982,983],{"class":979}," default",[641,985,987],{"class":986},"s2Zo4"," defineNuxtConfig",[641,989,990],{"class":647},"(",[641,992,994],{"class":993},"sMK4o","{\n",[641,996,997,1001,1004,1007,1010,1014,1016,1019],{"class":643,"line":651},[641,998,1000],{"class":999},"swJcz","  modules",[641,1002,1003],{"class":993},":",[641,1005,1006],{"class":647}," [",[641,1008,1009],{"class":993},"'",[641,1011,1013],{"class":1012},"sfazB","evlog\u002Fnuxt",[641,1015,1009],{"class":993},[641,1017,1018],{"class":647},"]",[641,1020,1021],{"class":993},",\n",[641,1023,1024,1027,1029],{"class":643,"line":657},[641,1025,1026],{"class":999},"  evlog",[641,1028,1003],{"class":993},[641,1030,1031],{"class":993}," {\n",[641,1033,1034,1037,1039,1041,1043,1046,1048,1050],{"class":643,"line":663},[641,1035,1036],{"class":999},"    include",[641,1038,1003],{"class":993},[641,1040,1006],{"class":647},[641,1042,1009],{"class":993},[641,1044,1045],{"class":1012},"\u002Fapi\u002F**",[641,1047,1009],{"class":993},[641,1049,1018],{"class":647},[641,1051,1021],{"class":993},[641,1053,1054],{"class":643,"line":669},[641,1055,1056],{"class":993},"  },\n",[641,1058,1059,1062],{"class":643,"line":675},[641,1060,1061],{"class":993},"}",[641,1063,1064],{"class":647},")\n",[947,1066,1068],{"id":1067},"_2-logger-creation","2. Logger Creation",[427,1070,1071,1072,1075],{},"For matched routes, evlog creates a ",[454,1073,1074],{},"RequestLogger"," and attaches it to the request context. The logger is pre-populated with:",[439,1077,1078,1088],{},[442,1079,1080],{},[445,1081,1082,1085],{},[448,1083,1084],{},"Field",[448,1086,1087],{},"Source",[471,1089,1090,1108,1118,1132],{},[445,1091,1092,1097],{},[476,1093,1094],{},[454,1095,1096],{},"method",[476,1098,1099,1100,1103,1104,1107],{},"HTTP method (",[454,1101,1102],{},"GET",", ",[454,1105,1106],{},"POST",", ...)",[445,1109,1110,1115],{},[476,1111,1112],{},[454,1113,1114],{},"path",[476,1116,1117],{},"Request path",[445,1119,1120,1125],{},[476,1121,1122],{},[454,1123,1124],{},"requestId",[476,1126,1127,1128,1131],{},"Auto-generated UUID (or ",[454,1129,1130],{},"cf-ray"," on Cloudflare)",[445,1133,1134,1139],{},[476,1135,1136],{},[454,1137,1138],{},"startTime",[476,1140,1141,1144],{},[454,1142,1143],{},"Date.now()"," for duration calculation",[427,1146,1147,1148,1150],{},"The logger is stored on the event context. ",[454,1149,520],{}," is a shortcut to retrieve it, it doesn't create a new logger.",[947,1152,1154],{"id":1153},"_3-context-accumulation","3. Context Accumulation",[427,1156,1157,1158,1160],{},"During the handler, you call ",[454,1159,511],{}," to attach context. Each call deep-merges into the existing context, so you can call it as many times as needed:",[632,1162,1165],{"className":969,"code":1163,"filename":1164,"language":972,"meta":637,"style":637},"import { useLogger } from 'evlog'\n\nconst log = useLogger(event)\n\nconst user = await getUser(event)\nlog.set({ user: { id: user.id, plan: user.plan } })\n\nconst cart = await getCart(user.id)\nlog.set({ cart: { items: cart.items.length, total: cart.total } })\n","server\u002Fapi\u002Fcheckout.post.ts",[454,1166,1167,1193,1199,1216,1220,1237,1290,1294,1316],{"__ignoreMap":637},[641,1168,1169,1172,1175,1178,1181,1184,1187,1190],{"class":643,"line":644},[641,1170,1171],{"class":979},"import",[641,1173,1174],{"class":993}," {",[641,1176,1177],{"class":647}," useLogger",[641,1179,1180],{"class":993}," }",[641,1182,1183],{"class":979}," from",[641,1185,1186],{"class":993}," '",[641,1188,1189],{"class":1012},"evlog",[641,1191,1192],{"class":993},"'\n",[641,1194,1195],{"class":643,"line":651},[641,1196,1198],{"emptyLinePlaceholder":1197},true,"\n",[641,1200,1201,1205,1208,1211,1213],{"class":643,"line":657},[641,1202,1204],{"class":1203},"spNyl","const",[641,1206,1207],{"class":647}," log ",[641,1209,1210],{"class":993},"=",[641,1212,1177],{"class":986},[641,1214,1215],{"class":647},"(event)\n",[641,1217,1218],{"class":643,"line":663},[641,1219,1198],{"emptyLinePlaceholder":1197},[641,1221,1222,1224,1227,1229,1232,1235],{"class":643,"line":669},[641,1223,1204],{"class":1203},[641,1225,1226],{"class":647}," user ",[641,1228,1210],{"class":993},[641,1230,1231],{"class":979}," await",[641,1233,1234],{"class":986}," getUser",[641,1236,1215],{"class":647},[641,1238,1239,1241,1243,1245,1247,1250,1253,1255,1257,1260,1262,1264,1266,1269,1272,1275,1277,1279,1281,1284,1286,1288],{"class":643,"line":675},[641,1240,456],{"class":647},[641,1242,620],{"class":993},[641,1244,598],{"class":986},[641,1246,990],{"class":647},[641,1248,1249],{"class":993},"{",[641,1251,1252],{"class":999}," user",[641,1254,1003],{"class":993},[641,1256,1174],{"class":993},[641,1258,1259],{"class":999}," id",[641,1261,1003],{"class":993},[641,1263,1252],{"class":647},[641,1265,620],{"class":993},[641,1267,1268],{"class":647},"id",[641,1270,1271],{"class":993},",",[641,1273,1274],{"class":999}," plan",[641,1276,1003],{"class":993},[641,1278,1252],{"class":647},[641,1280,620],{"class":993},[641,1282,1283],{"class":647},"plan ",[641,1285,1061],{"class":993},[641,1287,1180],{"class":993},[641,1289,1064],{"class":647},[641,1291,1292],{"class":643,"line":681},[641,1293,1198],{"emptyLinePlaceholder":1197},[641,1295,1296,1298,1301,1303,1305,1308,1311,1313],{"class":643,"line":687},[641,1297,1204],{"class":1203},[641,1299,1300],{"class":647}," cart ",[641,1302,1210],{"class":993},[641,1304,1231],{"class":979},[641,1306,1307],{"class":986}," getCart",[641,1309,1310],{"class":647},"(user",[641,1312,620],{"class":993},[641,1314,1315],{"class":647},"id)\n",[641,1317,1318,1320,1322,1324,1326,1328,1331,1333,1335,1338,1340,1342,1344,1347,1349,1352,1354,1357,1359,1361,1363,1366,1368,1370],{"class":643,"line":692},[641,1319,456],{"class":647},[641,1321,620],{"class":993},[641,1323,598],{"class":986},[641,1325,990],{"class":647},[641,1327,1249],{"class":993},[641,1329,1330],{"class":999}," cart",[641,1332,1003],{"class":993},[641,1334,1174],{"class":993},[641,1336,1337],{"class":999}," items",[641,1339,1003],{"class":993},[641,1341,1330],{"class":647},[641,1343,620],{"class":993},[641,1345,1346],{"class":647},"items",[641,1348,620],{"class":993},[641,1350,1351],{"class":647},"length",[641,1353,1271],{"class":993},[641,1355,1356],{"class":999}," total",[641,1358,1003],{"class":993},[641,1360,1330],{"class":647},[641,1362,620],{"class":993},[641,1364,1365],{"class":647},"total ",[641,1367,1061],{"class":993},[641,1369,1180],{"class":993},[641,1371,1064],{"class":647},[427,1373,1374,1375,1377],{},"If an error is thrown, evlog's ",[454,1376,601],{}," hook captures it automatically and records it on the logger with the status code.",[947,1379,1381],{"id":1380},"_4-request-end","4. Request End",[427,1383,1384],{},"When the response is sent (or an error is thrown), evlog computes:",[1386,1387,1388,1402,1411],"ul",{},[1389,1390,1391,1394,1395,463,1398,1401],"li",{},[479,1392,1393],{},"Status code"," from the response (or from the error's ",[454,1396,1397],{},"status",[454,1399,1400],{},"statusCode",")",[1389,1403,1404,1407,1408],{},[479,1405,1406],{},"Duration"," from ",[454,1409,1410],{},"Date.now() - startTime",[1389,1412,1413,1416,1417,1419,1420,1422,1423],{},[479,1414,1415],{},"Level"," - ",[454,1418,601],{}," if an error was recorded, ",[454,1421,607],{}," if status >= 400, otherwise ",[454,1424,604],{},[427,1426,1427],{},"If an error triggered the emit, the request is marked as already emitted to prevent double-emission in the response hook.",[947,1429,1431,1432,1401],{"id":1430},"_5-tail-sampling-evlogemitkeep","5. Tail Sampling (",[454,1433,1434],{},"evlog:emit:keep",[427,1436,1437,1438,1441,1442,1446],{},"Before the event is sampled, evlog evaluates ",[479,1439,1440],{},"tail sampling"," rules. These run ",[1443,1444,1445],"em",{},"after"," the request completes, so they can inspect the outcome:",[632,1448,1450],{"className":969,"code":1449,"filename":971,"language":972,"meta":637,"style":637},"evlog: {\n  sampling: {\n    keep: [\n      { duration: 1000 },          \u002F\u002F slow requests\n      { status: 400 },             \u002F\u002F client\u002Fserver errors\n      { path: '\u002Fapi\u002Fcritical\u002F**' }, \u002F\u002F critical paths\n    ],\n  },\n}\n",[454,1451,1452,1461,1470,1480,1501,1518,1539,1546,1550],{"__ignoreMap":637},[641,1453,1454,1457,1459],{"class":643,"line":644},[641,1455,1189],{"class":1456},"sBMFI",[641,1458,1003],{"class":993},[641,1460,1031],{"class":993},[641,1462,1463,1466,1468],{"class":643,"line":651},[641,1464,1465],{"class":1456},"  sampling",[641,1467,1003],{"class":993},[641,1469,1031],{"class":993},[641,1471,1472,1475,1477],{"class":643,"line":657},[641,1473,1474],{"class":1456},"    keep",[641,1476,1003],{"class":993},[641,1478,1479],{"class":999}," [\n",[641,1481,1482,1485,1488,1490,1494,1497],{"class":643,"line":663},[641,1483,1484],{"class":993},"      {",[641,1486,1487],{"class":999}," duration",[641,1489,1003],{"class":993},[641,1491,1493],{"class":1492},"sbssI"," 1000",[641,1495,1496],{"class":993}," },",[641,1498,1500],{"class":1499},"sHwdD","          \u002F\u002F slow requests\n",[641,1502,1503,1505,1508,1510,1513,1515],{"class":643,"line":669},[641,1504,1484],{"class":993},[641,1506,1507],{"class":999}," status",[641,1509,1003],{"class":993},[641,1511,1512],{"class":1492}," 400",[641,1514,1496],{"class":993},[641,1516,1517],{"class":1499},"             \u002F\u002F client\u002Fserver errors\n",[641,1519,1520,1522,1525,1527,1529,1532,1534,1536],{"class":643,"line":675},[641,1521,1484],{"class":993},[641,1523,1524],{"class":999}," path",[641,1526,1003],{"class":993},[641,1528,1186],{"class":993},[641,1530,1531],{"class":1012},"\u002Fapi\u002Fcritical\u002F**",[641,1533,1009],{"class":993},[641,1535,1496],{"class":993},[641,1537,1538],{"class":1499}," \u002F\u002F critical paths\n",[641,1540,1541,1544],{"class":643,"line":681},[641,1542,1543],{"class":999},"    ]",[641,1545,1021],{"class":993},[641,1547,1548],{"class":643,"line":687},[641,1549,1056],{"class":993},[641,1551,1552],{"class":643,"line":692},[641,1553,1554],{"class":993},"}\n",[427,1556,1557,1558,1560],{},"The ",[454,1559,1434],{}," hook also fires, letting you force-keep based on custom business logic:",[632,1562,1565],{"className":969,"code":1563,"filename":1564,"language":972,"meta":637,"style":637},"export default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook('evlog:emit:keep', (ctx) => {\n    if (ctx.context.user?.premium) {\n      ctx.shouldKeep = true\n    }\n  })\n})\n","server\u002Fplugins\u002Fevlog-custom.ts",[454,1566,1567,1591,1628,1658,1675,1680,1687],{"__ignoreMap":637},[641,1568,1569,1571,1573,1576,1578,1580,1584,1586,1589],{"class":643,"line":644},[641,1570,980],{"class":979},[641,1572,983],{"class":979},[641,1574,1575],{"class":986}," defineNitroPlugin",[641,1577,990],{"class":647},[641,1579,990],{"class":993},[641,1581,1583],{"class":1582},"sHdIc","nitroApp",[641,1585,1401],{"class":993},[641,1587,1588],{"class":1203}," =>",[641,1590,1031],{"class":993},[641,1592,1593,1596,1598,1601,1603,1606,1608,1610,1612,1614,1616,1619,1622,1624,1626],{"class":643,"line":651},[641,1594,1595],{"class":647},"  nitroApp",[641,1597,620],{"class":993},[641,1599,1600],{"class":647},"hooks",[641,1602,620],{"class":993},[641,1604,1605],{"class":986},"hook",[641,1607,990],{"class":999},[641,1609,1009],{"class":993},[641,1611,1434],{"class":1012},[641,1613,1009],{"class":993},[641,1615,1271],{"class":993},[641,1617,1618],{"class":993}," (",[641,1620,1621],{"class":1582},"ctx",[641,1623,1401],{"class":993},[641,1625,1588],{"class":1203},[641,1627,1031],{"class":993},[641,1629,1630,1633,1635,1637,1639,1642,1644,1647,1650,1653,1656],{"class":643,"line":657},[641,1631,1632],{"class":979},"    if",[641,1634,1618],{"class":999},[641,1636,1621],{"class":647},[641,1638,620],{"class":993},[641,1640,1641],{"class":647},"context",[641,1643,620],{"class":993},[641,1645,1646],{"class":647},"user",[641,1648,1649],{"class":993},"?.",[641,1651,1652],{"class":647},"premium",[641,1654,1655],{"class":999},") ",[641,1657,994],{"class":993},[641,1659,1660,1663,1665,1668,1671],{"class":643,"line":663},[641,1661,1662],{"class":647},"      ctx",[641,1664,620],{"class":993},[641,1666,1667],{"class":647},"shouldKeep",[641,1669,1670],{"class":993}," =",[641,1672,1674],{"class":1673},"sfNiH"," true\n",[641,1676,1677],{"class":643,"line":669},[641,1678,1679],{"class":993},"    }\n",[641,1681,1682,1685],{"class":643,"line":675},[641,1683,1684],{"class":993},"  }",[641,1686,1064],{"class":999},[641,1688,1689,1691],{"class":643,"line":681},[641,1690,1061],{"class":993},[641,1692,1064],{"class":647},[427,1694,1695,1696,1699,1700,620],{},"If any rule or hook sets ",[454,1697,1698],{},"shouldKeep = true",", the event ",[479,1701,1702],{},"bypasses head sampling entirely",[947,1704,1706],{"id":1705},"_6-head-sampling","6. Head Sampling",[427,1708,1709],{},"If the event wasn't force-kept by tail sampling, head sampling applies. This is a random coin flip per log level.",[427,1711,1712,1713,1716],{},"By default, all levels are kept at 100% (no sampling). Configure ",[454,1714,1715],{},"sampling.rates"," to reduce volume in production:",[632,1718,1720],{"className":969,"code":1719,"filename":971,"language":972,"meta":637,"style":637},"evlog: {\n  sampling: {\n    rates: { info: 10, warn: 50, debug: 0 },\n  },\n}\n",[454,1721,1722,1730,1738,1778,1782],{"__ignoreMap":637},[641,1723,1724,1726,1728],{"class":643,"line":644},[641,1725,1189],{"class":1456},[641,1727,1003],{"class":993},[641,1729,1031],{"class":993},[641,1731,1732,1734,1736],{"class":643,"line":651},[641,1733,1465],{"class":1456},[641,1735,1003],{"class":993},[641,1737,1031],{"class":993},[641,1739,1740,1743,1745,1747,1750,1752,1755,1757,1760,1762,1765,1767,1770,1772,1775],{"class":643,"line":657},[641,1741,1742],{"class":1456},"    rates",[641,1744,1003],{"class":993},[641,1746,1174],{"class":993},[641,1748,1749],{"class":1456}," info",[641,1751,1003],{"class":993},[641,1753,1754],{"class":1492}," 10",[641,1756,1271],{"class":993},[641,1758,1759],{"class":1456}," warn",[641,1761,1003],{"class":993},[641,1763,1764],{"class":1492}," 50",[641,1766,1271],{"class":993},[641,1768,1769],{"class":1456}," debug",[641,1771,1003],{"class":993},[641,1773,1774],{"class":1492}," 0",[641,1776,1777],{"class":993}," },\n",[641,1779,1780],{"class":643,"line":663},[641,1781,1056],{"class":993},[641,1783,1784],{"class":643,"line":669},[641,1785,1554],{"class":993},[1386,1787,1788,1794,1800],{},[1389,1789,1790,1793],{},[454,1791,1792],{},"info: 10"," - keep 10% of info-level events",[1389,1795,1796,1799],{},[454,1797,1798],{},"warn: 50"," - keep 50% of warnings",[1389,1801,1802,1804,1805,1808],{},[454,1803,601],{}," defaults to ",[479,1806,1807],{},"100%"," (never sampled out, even if you set a rate)",[427,1810,1811],{},"If the event is sampled out, processing stops entirely: no console output, no enrichment, no drain.",[947,1813,1815],{"id":1814},"_7-emit","7. Emit",[427,1817,1557,1818,1821],{},[454,1819,1820],{},"WideEvent"," object is built from the accumulated context:",[632,1823,1827],{"className":1824,"code":1825,"filename":1820,"language":1826,"meta":637,"style":637},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"timestamp\": \"2026-01-15T10:30:00.000Z\",\n  \"level\": \"info\",\n  \"service\": \"my-app\",\n  \"method\": \"POST\",\n  \"path\": \"\u002Fapi\u002Fcheckout\",\n  \"requestId\": \"abc-123\",\n  \"duration\": 234,\n  \"status\": 200,\n  \"user\": { \"id\": 1, \"plan\": \"pro\" },\n  \"cart\": { \"items\": 3, \"total\": 9999 }\n}\n","json",[454,1828,1829,1833,1856,1875,1895,1913,1932,1951,1967,1982,2025,2066],{"__ignoreMap":637},[641,1830,1831],{"class":643,"line":644},[641,1832,994],{"class":993},[641,1834,1835,1838,1841,1844,1846,1849,1852,1854],{"class":643,"line":651},[641,1836,1837],{"class":993},"  \"",[641,1839,1840],{"class":1203},"timestamp",[641,1842,1843],{"class":993},"\"",[641,1845,1003],{"class":993},[641,1847,1848],{"class":993}," \"",[641,1850,1851],{"class":1012},"2026-01-15T10:30:00.000Z",[641,1853,1843],{"class":993},[641,1855,1021],{"class":993},[641,1857,1858,1860,1863,1865,1867,1869,1871,1873],{"class":643,"line":657},[641,1859,1837],{"class":993},[641,1861,1862],{"class":1203},"level",[641,1864,1843],{"class":993},[641,1866,1003],{"class":993},[641,1868,1848],{"class":993},[641,1870,604],{"class":1012},[641,1872,1843],{"class":993},[641,1874,1021],{"class":993},[641,1876,1877,1879,1882,1884,1886,1888,1891,1893],{"class":643,"line":663},[641,1878,1837],{"class":993},[641,1880,1881],{"class":1203},"service",[641,1883,1843],{"class":993},[641,1885,1003],{"class":993},[641,1887,1848],{"class":993},[641,1889,1890],{"class":1012},"my-app",[641,1892,1843],{"class":993},[641,1894,1021],{"class":993},[641,1896,1897,1899,1901,1903,1905,1907,1909,1911],{"class":643,"line":669},[641,1898,1837],{"class":993},[641,1900,1096],{"class":1203},[641,1902,1843],{"class":993},[641,1904,1003],{"class":993},[641,1906,1848],{"class":993},[641,1908,1106],{"class":1012},[641,1910,1843],{"class":993},[641,1912,1021],{"class":993},[641,1914,1915,1917,1919,1921,1923,1925,1928,1930],{"class":643,"line":675},[641,1916,1837],{"class":993},[641,1918,1114],{"class":1203},[641,1920,1843],{"class":993},[641,1922,1003],{"class":993},[641,1924,1848],{"class":993},[641,1926,1927],{"class":1012},"\u002Fapi\u002Fcheckout",[641,1929,1843],{"class":993},[641,1931,1021],{"class":993},[641,1933,1934,1936,1938,1940,1942,1944,1947,1949],{"class":643,"line":681},[641,1935,1837],{"class":993},[641,1937,1124],{"class":1203},[641,1939,1843],{"class":993},[641,1941,1003],{"class":993},[641,1943,1848],{"class":993},[641,1945,1946],{"class":1012},"abc-123",[641,1948,1843],{"class":993},[641,1950,1021],{"class":993},[641,1952,1953,1955,1958,1960,1962,1965],{"class":643,"line":687},[641,1954,1837],{"class":993},[641,1956,1957],{"class":1203},"duration",[641,1959,1843],{"class":993},[641,1961,1003],{"class":993},[641,1963,1964],{"class":1492}," 234",[641,1966,1021],{"class":993},[641,1968,1969,1971,1973,1975,1977,1980],{"class":643,"line":692},[641,1970,1837],{"class":993},[641,1972,1397],{"class":1203},[641,1974,1843],{"class":993},[641,1976,1003],{"class":993},[641,1978,1979],{"class":1492}," 200",[641,1981,1021],{"class":993},[641,1983,1984,1986,1988,1990,1992,1994,1996,1998,2000,2002,2005,2007,2009,2012,2014,2016,2018,2021,2023],{"class":643,"line":698},[641,1985,1837],{"class":993},[641,1987,1646],{"class":1203},[641,1989,1843],{"class":993},[641,1991,1003],{"class":993},[641,1993,1174],{"class":993},[641,1995,1848],{"class":993},[641,1997,1268],{"class":1456},[641,1999,1843],{"class":993},[641,2001,1003],{"class":993},[641,2003,2004],{"class":1492}," 1",[641,2006,1271],{"class":993},[641,2008,1848],{"class":993},[641,2010,2011],{"class":1456},"plan",[641,2013,1843],{"class":993},[641,2015,1003],{"class":993},[641,2017,1848],{"class":993},[641,2019,2020],{"class":1012},"pro",[641,2022,1843],{"class":993},[641,2024,1777],{"class":993},[641,2026,2027,2029,2032,2034,2036,2038,2040,2042,2044,2046,2049,2051,2053,2056,2058,2060,2063],{"class":643,"line":704},[641,2028,1837],{"class":993},[641,2030,2031],{"class":1203},"cart",[641,2033,1843],{"class":993},[641,2035,1003],{"class":993},[641,2037,1174],{"class":993},[641,2039,1848],{"class":993},[641,2041,1346],{"class":1456},[641,2043,1843],{"class":993},[641,2045,1003],{"class":993},[641,2047,2048],{"class":1492}," 3",[641,2050,1271],{"class":993},[641,2052,1848],{"class":993},[641,2054,2055],{"class":1456},"total",[641,2057,1843],{"class":993},[641,2059,1003],{"class":993},[641,2061,2062],{"class":1492}," 9999",[641,2064,2065],{"class":993}," }\n",[641,2067,2068],{"class":643,"line":710},[641,2069,1554],{"class":993},[427,2071,2072],{},"The event is printed to the console, pretty-formatted in development and as JSON in production. This is the default behavior, no configuration needed.",[947,2074,2076,2077,1401],{"id":2075},"_8-enrich-evlogenrich","8. Enrich (",[454,2078,2079],{},"evlog:enrich",[427,2081,2082],{},"After emission, enrichers add derived context to the event. Built-in enrichers extract data from request headers:",[439,2084,2085,2097],{},[442,2086,2087],{},[445,2088,2089,2092,2095],{},[448,2090,2091],{},"Enricher",[448,2093,2094],{},"Adds",[448,2096,1087],{},[471,2098,2099,2116,2130,2147],{},[445,2100,2101,2104,2110],{},[476,2102,2103],{},"User Agent",[476,2105,2106,2109],{},[454,2107,2108],{},"userAgent"," (browser, OS, device)",[476,2111,2112,2115],{},[454,2113,2114],{},"User-Agent"," header",[445,2117,2118,2121,2127],{},[476,2119,2120],{},"Geo",[476,2122,2123,2126],{},[454,2124,2125],{},"geo"," (country, region, city)",[476,2128,2129],{},"Platform headers (Vercel, Cloudflare)",[445,2131,2132,2135,2141],{},[476,2133,2134],{},"Request Size",[476,2136,2137,2140],{},[454,2138,2139],{},"requestSize"," (request\u002Fresponse bytes)",[476,2142,2143,2146],{},[454,2144,2145],{},"Content-Length"," headers",[445,2148,2149,2152,2158],{},[476,2150,2151],{},"Trace Context",[476,2153,2154,2157],{},[454,2155,2156],{},"traceContext"," (traceId, spanId)",[476,2159,2160,2115],{},[454,2161,2162],{},"traceparent",[632,2164,2167],{"className":969,"code":2165,"filename":2166,"language":972,"meta":637,"style":637},"import { createUserAgentEnricher, createGeoEnricher } from 'evlog\u002Fenrichers'\n\nexport default defineNitroPlugin((nitroApp) => {\n  const enrichers = [createUserAgentEnricher(), createGeoEnricher()]\n\n  nitroApp.hooks.hook('evlog:enrich', (ctx) => {\n    for (const enricher of enrichers) enricher(ctx)\n  })\n})\n","server\u002Fplugins\u002Fevlog-enrich.ts",[454,2168,2169,2194,2198,2218,2243,2247,2279,2307,2313],{"__ignoreMap":637},[641,2170,2171,2173,2175,2178,2180,2183,2185,2187,2189,2192],{"class":643,"line":644},[641,2172,1171],{"class":979},[641,2174,1174],{"class":993},[641,2176,2177],{"class":647}," createUserAgentEnricher",[641,2179,1271],{"class":993},[641,2181,2182],{"class":647}," createGeoEnricher",[641,2184,1180],{"class":993},[641,2186,1183],{"class":979},[641,2188,1186],{"class":993},[641,2190,2191],{"class":1012},"evlog\u002Fenrichers",[641,2193,1192],{"class":993},[641,2195,2196],{"class":643,"line":651},[641,2197,1198],{"emptyLinePlaceholder":1197},[641,2199,2200,2202,2204,2206,2208,2210,2212,2214,2216],{"class":643,"line":657},[641,2201,980],{"class":979},[641,2203,983],{"class":979},[641,2205,1575],{"class":986},[641,2207,990],{"class":647},[641,2209,990],{"class":993},[641,2211,1583],{"class":1582},[641,2213,1401],{"class":993},[641,2215,1588],{"class":1203},[641,2217,1031],{"class":993},[641,2219,2220,2223,2226,2228,2230,2233,2236,2238,2240],{"class":643,"line":663},[641,2221,2222],{"class":1203},"  const",[641,2224,2225],{"class":647}," enrichers",[641,2227,1670],{"class":993},[641,2229,1006],{"class":999},[641,2231,2232],{"class":986},"createUserAgentEnricher",[641,2234,2235],{"class":999},"()",[641,2237,1271],{"class":993},[641,2239,2182],{"class":986},[641,2241,2242],{"class":999},"()]\n",[641,2244,2245],{"class":643,"line":669},[641,2246,1198],{"emptyLinePlaceholder":1197},[641,2248,2249,2251,2253,2255,2257,2259,2261,2263,2265,2267,2269,2271,2273,2275,2277],{"class":643,"line":675},[641,2250,1595],{"class":647},[641,2252,620],{"class":993},[641,2254,1600],{"class":647},[641,2256,620],{"class":993},[641,2258,1605],{"class":986},[641,2260,990],{"class":999},[641,2262,1009],{"class":993},[641,2264,2079],{"class":1012},[641,2266,1009],{"class":993},[641,2268,1271],{"class":993},[641,2270,1618],{"class":993},[641,2272,1621],{"class":1582},[641,2274,1401],{"class":993},[641,2276,1588],{"class":1203},[641,2278,1031],{"class":993},[641,2280,2281,2284,2286,2288,2291,2294,2296,2298,2301,2303,2305],{"class":643,"line":681},[641,2282,2283],{"class":979},"    for",[641,2285,1618],{"class":999},[641,2287,1204],{"class":1203},[641,2289,2290],{"class":647}," enricher",[641,2292,2293],{"class":993}," of",[641,2295,2225],{"class":647},[641,2297,1655],{"class":999},[641,2299,2300],{"class":986},"enricher",[641,2302,990],{"class":999},[641,2304,1621],{"class":647},[641,2306,1064],{"class":999},[641,2308,2309,2311],{"class":643,"line":687},[641,2310,1684],{"class":993},[641,2312,1064],{"class":999},[641,2314,2315,2317],{"class":643,"line":692},[641,2316,1061],{"class":993},[641,2318,1064],{"class":647},[427,2320,2321,2322,2325],{},"Enrichers receive the full ",[454,2323,2324],{},"EnrichContext"," with the mutable event, request metadata, safe headers, and response info.",[947,2327,2329,2330,1401],{"id":2328},"_9-drain-evlogdrain","9. Drain (",[454,2331,2332],{},"evlog:drain",[427,2334,2335,2336,2338,2339,2342],{},"The final step sends the enriched event to your observability platform. The ",[454,2337,2332],{}," hook receives a ",[454,2340,2341],{},"DrainContext"," with the complete event:",[632,2344,2347],{"className":969,"code":2345,"filename":2346,"language":972,"meta":637,"style":637},"import { createAxiomDrain } from 'evlog\u002Faxiom'\n\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook('evlog:drain', createAxiomDrain())\n})\n","server\u002Fplugins\u002Fevlog-drain.ts",[454,2348,2349,2369,2373,2393,2420],{"__ignoreMap":637},[641,2350,2351,2353,2355,2358,2360,2362,2364,2367],{"class":643,"line":644},[641,2352,1171],{"class":979},[641,2354,1174],{"class":993},[641,2356,2357],{"class":647}," createAxiomDrain",[641,2359,1180],{"class":993},[641,2361,1183],{"class":979},[641,2363,1186],{"class":993},[641,2365,2366],{"class":1012},"evlog\u002Faxiom",[641,2368,1192],{"class":993},[641,2370,2371],{"class":643,"line":651},[641,2372,1198],{"emptyLinePlaceholder":1197},[641,2374,2375,2377,2379,2381,2383,2385,2387,2389,2391],{"class":643,"line":657},[641,2376,980],{"class":979},[641,2378,983],{"class":979},[641,2380,1575],{"class":986},[641,2382,990],{"class":647},[641,2384,990],{"class":993},[641,2386,1583],{"class":1582},[641,2388,1401],{"class":993},[641,2390,1588],{"class":1203},[641,2392,1031],{"class":993},[641,2394,2395,2397,2399,2401,2403,2405,2407,2409,2411,2413,2415,2417],{"class":643,"line":663},[641,2396,1595],{"class":647},[641,2398,620],{"class":993},[641,2400,1600],{"class":647},[641,2402,620],{"class":993},[641,2404,1605],{"class":986},[641,2406,990],{"class":999},[641,2408,1009],{"class":993},[641,2410,2332],{"class":1012},[641,2412,1009],{"class":993},[641,2414,1271],{"class":993},[641,2416,2357],{"class":986},[641,2418,2419],{"class":999},"())\n",[641,2421,2422,2424],{"class":643,"line":669},[641,2423,1061],{"class":993},[641,2425,1064],{"class":647},[427,2427,2428,2429,2432],{},"On platforms with ",[454,2430,2431],{},"waitUntil"," (Cloudflare Workers, Vercel Edge), the drain runs after the response is sent to avoid adding latency. On traditional servers, the drain is awaited to prevent losing events in serverless cold shutdowns.",[434,2434,2436],{"id":2435},"hook-execution-order","Hook Execution Order",[439,2438,2439,2455],{},[442,2440,2441],{},[445,2442,2443,2446,2449,2452],{},[448,2444,2445],{},"Order",[448,2447,2448],{},"Hook",[448,2450,2451],{},"When",[448,2453,2454],{},"Purpose",[471,2456,2457,2472,2487],{},[445,2458,2459,2462,2466,2469],{},[476,2460,2461],{},"1",[476,2463,2464],{},[454,2465,1434],{},[476,2467,2468],{},"After request ends, before sampling",[476,2470,2471],{},"Force-keep events based on outcome",[445,2473,2474,2477,2481,2484],{},[476,2475,2476],{},"2",[476,2478,2479],{},[454,2480,2079],{},[476,2482,2483],{},"After emit, before drain",[476,2485,2486],{},"Add derived context to the event",[445,2488,2489,2492,2496,2499],{},[476,2490,2491],{},"3",[476,2493,2494],{},[454,2495,2332],{},[476,2497,2498],{},"After enrichment",[476,2500,2501],{},"Send event to external services",[434,2503,2505],{"id":2504},"error-vs-success-path","Error vs Success Path",[427,2507,2508,2509,2512],{},"Both paths converge at the same emit\u002Fenrich\u002Fdrain pipeline. The only difference is ",[1443,2510,2511],{},"when"," the emit is triggered:",[439,2514,2515,2527],{},[442,2516,2517],{},[445,2518,2519,2521,2524],{},[448,2520],{},[448,2522,2523],{},"Success",[448,2525,2526],{},"Error",[471,2528,2529,2549,2567,2583,2604],{},[445,2530,2531,2536,2545],{},[476,2532,2533],{},[479,2534,2535],{},"Trigger",[476,2537,2538,463,2541,2544],{},[454,2539,2540],{},"afterResponse",[454,2542,2543],{},"response"," hook",[476,2546,2547,2544],{},[454,2548,601],{},[445,2550,2551,2555,2563],{},[476,2552,2553],{},[479,2554,1415],{},[476,2556,2557,2559,2560,2562],{},[454,2558,604],{}," (or ",[454,2561,607],{}," if status >= 400)",[476,2564,2565],{},[454,2566,601],{},[445,2568,2569,2574,2577],{},[476,2570,2571],{},[479,2572,2573],{},"Status",[476,2575,2576],{},"From response",[476,2578,2579,2580,2582],{},"From error's ",[454,2581,1397],{}," field (default 500)",[445,2584,2585,2590,2593],{},[476,2586,2587],{},[479,2588,2589],{},"Error context",[476,2591,2592],{},"None",[476,2594,2595,2597,2598,1103,2601],{},[454,2596,601],{}," field with message, stack, ",[454,2599,2600],{},"why",[454,2602,2603],{},"fix",[445,2605,2606,2611,2618],{},[476,2607,2608],{},[479,2609,2610],{},"Double-emit guard",[476,2612,2613,2614,2617],{},"Checks ",[454,2615,2616],{},"_evlogEmitted"," flag",[476,2619,2620,2621],{},"Sets ",[454,2622,2623],{},"_evlogEmitted = true",[434,2625,2627],{"id":2626},"simple-logging-pipeline","Simple Logging Pipeline",[427,2629,2630,2631,2633],{},"When using the ",[454,2632,456],{}," singleton, the pipeline is shorter:",[2635,2636,2637,2649,2654],"ol",{},[1389,2638,2639,2642,2643,490,2646],{},[479,2640,2641],{},"Call",": ",[454,2644,2645],{},"log.info({ action: 'deploy' })",[454,2647,2648],{},"log.info('tag', 'message')",[1389,2650,2651,2653],{},[479,2652,527],{},": The event is built and printed immediately",[1389,2655,2656,2658,2659,2662,2663,2666],{},[479,2657,576],{},": If a global ",[454,2660,2661],{},"drain"," was configured via ",[454,2664,2665],{},"initLogger()",", the event is sent to external services",[427,2668,2669,2670,2672,2673,2676],{},"Tagged logs (",[454,2671,2648],{},") are console-only in pretty mode. Object-form logs (",[454,2674,2675],{},"log.info({ ... })",") always flow through the drain pipeline.",[434,2678,2680],{"id":2679},"standalone-wide-event-pipeline","Standalone Wide Event Pipeline",[427,2682,2683,2684,2687],{},"When using ",[454,2685,2686],{},"createLogger()"," outside a framework:",[2635,2689,2690,2697,2713,2721,2729],{},[1389,2691,2692,2642,2694],{},[479,2693,481],{},[454,2695,2696],{},"createLogger({ jobId: 'sync-001' })",[1389,2698,2699,2642,2701,1103,2703,1103,2706,1103,2709,2712],{},[479,2700,503],{},[454,2702,511],{},[454,2704,2705],{},"log.info()",[454,2707,2708],{},"log.warn()",[454,2710,2711],{},"log.error()"," over the operation",[1389,2714,2715,2717,2718,2720],{},[479,2716,527],{},": Manual ",[454,2719,536],{}," call",[1389,2722,2723,2725,2726],{},[479,2724,546],{},": Head sampling applies based on computed level. Tail sampling via ",[454,2727,2728],{},"initLogger({ sampling: { keep: [...] } })",[1389,2730,2731,2658,2733,2735],{},[479,2732,576],{},[454,2734,2661],{}," was configured, the event is sent",[632,2737,2740],{"className":969,"code":2738,"filename":2739,"language":972,"meta":637,"style":637},"import { initLogger, createLogger } from 'evlog'\nimport { createAxiomDrain } from 'evlog\u002Faxiom'\n\ninitLogger({\n  env: { service: 'worker' },\n  drain: createAxiomDrain(),\n  sampling: { rates: { info: 10 } },\n})\n\nconst log = createLogger({ task: 'migrate' })\nlog.set({ records: 500, status: 'complete' })\nlog.emit()\n","scripts\u002Fmigrate.ts",[454,2741,2742,2766,2784,2788,2797,2820,2833,2858,2864,2868,2898,2935],{"__ignoreMap":637},[641,2743,2744,2746,2748,2751,2753,2756,2758,2760,2762,2764],{"class":643,"line":644},[641,2745,1171],{"class":979},[641,2747,1174],{"class":993},[641,2749,2750],{"class":647}," initLogger",[641,2752,1271],{"class":993},[641,2754,2755],{"class":647}," createLogger",[641,2757,1180],{"class":993},[641,2759,1183],{"class":979},[641,2761,1186],{"class":993},[641,2763,1189],{"class":1012},[641,2765,1192],{"class":993},[641,2767,2768,2770,2772,2774,2776,2778,2780,2782],{"class":643,"line":651},[641,2769,1171],{"class":979},[641,2771,1174],{"class":993},[641,2773,2357],{"class":647},[641,2775,1180],{"class":993},[641,2777,1183],{"class":979},[641,2779,1186],{"class":993},[641,2781,2366],{"class":1012},[641,2783,1192],{"class":993},[641,2785,2786],{"class":643,"line":657},[641,2787,1198],{"emptyLinePlaceholder":1197},[641,2789,2790,2793,2795],{"class":643,"line":663},[641,2791,2792],{"class":986},"initLogger",[641,2794,990],{"class":647},[641,2796,994],{"class":993},[641,2798,2799,2802,2804,2806,2809,2811,2813,2816,2818],{"class":643,"line":669},[641,2800,2801],{"class":999},"  env",[641,2803,1003],{"class":993},[641,2805,1174],{"class":993},[641,2807,2808],{"class":999}," service",[641,2810,1003],{"class":993},[641,2812,1186],{"class":993},[641,2814,2815],{"class":1012},"worker",[641,2817,1009],{"class":993},[641,2819,1777],{"class":993},[641,2821,2822,2825,2827,2829,2831],{"class":643,"line":675},[641,2823,2824],{"class":999},"  drain",[641,2826,1003],{"class":993},[641,2828,2357],{"class":986},[641,2830,2235],{"class":647},[641,2832,1021],{"class":993},[641,2834,2835,2837,2839,2841,2844,2846,2848,2850,2852,2854,2856],{"class":643,"line":681},[641,2836,1465],{"class":999},[641,2838,1003],{"class":993},[641,2840,1174],{"class":993},[641,2842,2843],{"class":999}," rates",[641,2845,1003],{"class":993},[641,2847,1174],{"class":993},[641,2849,1749],{"class":999},[641,2851,1003],{"class":993},[641,2853,1754],{"class":1492},[641,2855,1180],{"class":993},[641,2857,1777],{"class":993},[641,2859,2860,2862],{"class":643,"line":687},[641,2861,1061],{"class":993},[641,2863,1064],{"class":647},[641,2865,2866],{"class":643,"line":692},[641,2867,1198],{"emptyLinePlaceholder":1197},[641,2869,2870,2872,2874,2876,2878,2880,2882,2885,2887,2889,2892,2894,2896],{"class":643,"line":698},[641,2871,1204],{"class":1203},[641,2873,1207],{"class":647},[641,2875,1210],{"class":993},[641,2877,2755],{"class":986},[641,2879,990],{"class":647},[641,2881,1249],{"class":993},[641,2883,2884],{"class":999}," task",[641,2886,1003],{"class":993},[641,2888,1186],{"class":993},[641,2890,2891],{"class":1012},"migrate",[641,2893,1009],{"class":993},[641,2895,1180],{"class":993},[641,2897,1064],{"class":647},[641,2899,2900,2902,2904,2906,2908,2910,2913,2915,2918,2920,2922,2924,2926,2929,2931,2933],{"class":643,"line":704},[641,2901,456],{"class":647},[641,2903,620],{"class":993},[641,2905,598],{"class":986},[641,2907,990],{"class":647},[641,2909,1249],{"class":993},[641,2911,2912],{"class":999}," records",[641,2914,1003],{"class":993},[641,2916,2917],{"class":1492}," 500",[641,2919,1271],{"class":993},[641,2921,1507],{"class":999},[641,2923,1003],{"class":993},[641,2925,1186],{"class":993},[641,2927,2928],{"class":1012},"complete",[641,2930,1009],{"class":993},[641,2932,1180],{"class":993},[641,2934,1064],{"class":647},[641,2936,2937,2939,2941,2943],{"class":643,"line":710},[641,2938,456],{"class":647},[641,2940,620],{"class":993},[641,2942,590],{"class":986},[641,2944,2945],{"class":647},"()\n",[434,2947,2949],{"id":2948},"next-steps","Next Steps",[1386,2951,2952,2957,2962,2967],{},[1389,2953,2954,2956],{},[616,2955,51],{"href":52}," - Design effective wide events",[1389,2958,2959,2961],{},[616,2960,175],{"href":176}," - Configure head and tail sampling",[1389,2963,2964,2966],{},[616,2965,319],{"href":324}," - Send events to external platforms",[1389,2968,2969,2971],{},[616,2970,406],{"href":411}," - Add derived context automatically",[2973,2974,2975],"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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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 .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}",{"title":637,"searchDepth":651,"depth":651,"links":2977},[2978,2979,2980,2994,2995,2996,2997,2998],{"id":436,"depth":651,"text":437},{"id":623,"depth":651,"text":624},{"id":944,"depth":651,"text":945,"children":2981},[2982,2983,2984,2985,2986,2988,2989,2990,2992],{"id":949,"depth":657,"text":950},{"id":1067,"depth":657,"text":1068},{"id":1153,"depth":657,"text":1154},{"id":1380,"depth":657,"text":1381},{"id":1430,"depth":657,"text":2987},"5. Tail Sampling (evlog:emit:keep)",{"id":1705,"depth":657,"text":1706},{"id":1814,"depth":657,"text":1815},{"id":2075,"depth":657,"text":2991},"8. Enrich (evlog:enrich)",{"id":2328,"depth":657,"text":2993},"9. Drain (evlog:drain)",{"id":2435,"depth":651,"text":2436},{"id":2504,"depth":651,"text":2505},{"id":2626,"depth":651,"text":2627},{"id":2679,"depth":651,"text":2680},{"id":2948,"depth":651,"text":2949},"Understand the full lifecycle of an evlog event, from creation to drain. Covers all three modes (simple logging, wide events, request logging), sampling, enrichment, and delivery.","md",[3002,3005],{"label":51,"icon":54,"to":52,"color":3003,"variant":3004},"neutral","subtle",{"label":175,"icon":178,"to":176,"color":3003,"variant":3004},{},{"icon":168},{"title":165,"description":2999},"ko0Yqtv5gfyASgTB4rgolHyD5Zyaq4AJN3VbVSQ4pIM",[3011,3013],{"title":156,"path":157,"stem":158,"description":3012,"icon":64,"children":-1},"File system, Axiom, and Postgres recipes for audit logs, plus mockAudit for tests and the full API reference.",{"title":170,"path":171,"stem":172,"description":3014,"icon":173,"children":-1},"Complete reference for all evlog configuration options including global logger settings, middleware options, environment context, and framework-specific overrides.",1778333319627]