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