[{"data":1,"prerenderedAt":1411},["ShallowReactive",2],{"navigation_docs":3,"-enrichers-overview":454,"-enrichers-overview-surround":1406},[4,35,159,201,289,352,438],{"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,316,321,326,330,334,338,342,347],{"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},"In-process stream","\u002Fbuild-on-top\u002Fin-process-stream","5.build-on-top\u002F1.in-process-stream","i-lucide-radio-tower",{"title":303,"path":304,"stem":305,"icon":306},"Fanout","\u002Fbuild-on-top\u002Ffanout-and-multi-drain","5.build-on-top\u002F10.fanout-and-multi-drain","i-lucide-share-2",{"title":308,"path":309,"stem":310,"icon":311},"Identity headers","\u002Fbuild-on-top\u002Fidentity-headers","5.build-on-top\u002F11.identity-headers","i-lucide-fingerprint",{"title":313,"path":314,"stem":315,"icon":288},"Custom framework","\u002Fbuild-on-top\u002Fcustom-framework","5.build-on-top\u002F12.custom-framework",{"title":317,"path":318,"stem":319,"icon":320},"Stream server","\u002Fbuild-on-top\u002Fstream-server","5.build-on-top\u002F2.stream-server","i-lucide-radio",{"title":322,"path":323,"stem":324,"icon":325},"FS reader","\u002Fbuild-on-top\u002Ffs-reader","5.build-on-top\u002F3.fs-reader","i-lucide-folder-search",{"title":156,"path":327,"stem":328,"icon":329},"\u002Fbuild-on-top\u002Fconsumer-recipes","5.build-on-top\u002F4.consumer-recipes","i-lucide-chef-hat",{"title":331,"path":332,"stem":333,"icon":288},"Plugins","\u002Fbuild-on-top\u002Fplugins","5.build-on-top\u002F5.plugins",{"title":335,"path":336,"stem":337,"icon":28},"Custom enrichers","\u002Fbuild-on-top\u002Fcustom-enrichers","5.build-on-top\u002F6.custom-enrichers",{"title":339,"path":340,"stem":341,"icon":178},"Tail sampling","\u002Fbuild-on-top\u002Ftail-sampling","5.build-on-top\u002F7.tail-sampling",{"title":343,"path":344,"stem":345,"icon":346},"Custom drains","\u002Fbuild-on-top\u002Fcustom-drains","5.build-on-top\u002F8.custom-drains","i-lucide-code-2",{"title":348,"path":349,"stem":350,"icon":351},"Drain pipeline","\u002Fbuild-on-top\u002Fdrain-pipeline","5.build-on-top\u002F9.drain-pipeline","i-lucide-workflow",{"title":353,"path":354,"stem":355,"children":356,"page":34},"Adapters","\u002Fadapters","6.adapters",[357,360,400,415],{"title":41,"path":358,"stem":359,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":361,"path":362,"stem":363,"children":364,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[365,370,375,380,385,390,395],{"title":366,"path":367,"stem":368,"icon":369},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":371,"path":372,"stem":373,"icon":374},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":376,"path":377,"stem":378,"icon":379},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":381,"path":382,"stem":383,"icon":384},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":386,"path":387,"stem":388,"icon":389},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":391,"path":392,"stem":393,"icon":394},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":396,"path":397,"stem":398,"icon":399},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":401,"path":402,"stem":403,"children":404,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[405,410],{"title":406,"path":407,"stem":408,"icon":409},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":411,"path":412,"stem":413,"icon":414},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":416,"path":417,"stem":418,"children":419,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[420,424,429,433],{"title":421,"path":422,"stem":423,"icon":351},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline",{"title":425,"path":426,"stem":427,"icon":428},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":430,"path":431,"stem":432,"icon":83},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":434,"path":435,"stem":436,"icon":437},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":439,"path":440,"stem":441,"children":442,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[443,446,450],{"title":41,"path":444,"stem":445,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":447,"path":448,"stem":449,"icon":288},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":451,"path":452,"stem":453,"icon":83},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":455,"title":456,"body":457,"description":1396,"extension":1397,"links":1398,"meta":1402,"navigation":1403,"path":444,"seo":1404,"stem":445,"__hash__":1405},"docs\u002F7.enrichers\u002F1.overview.md","Enrichers Overview",{"type":458,"value":459,"toc":1389},"minimark",[460,464,467,522,527,539,549,1157,1161,1168,1264,1283,1287,1317,1321,1332,1359,1367,1371,1385],[461,462,463],"p",{},"Enrichers add derived context to your wide events after they are emitted, before they reach your drain adapters. Use them to automatically extract useful information from request headers without cluttering your application code.",[465,466],"enricher-chain",{},[468,469,472,475,508],"prompt",{":actions":470,"description":471,"icon":28},"[\"copy\",\"cursor\",\"windsurf\"]","Add evlog enrichers to my app",[461,473,474],{},"Add evlog enrichers to my app so wide events automatically include derived context.",[476,477,478,482,485,488,496,502,505],"ul",{},[479,480,481],"li",{},"Identify my framework and follow its evlog wiring pattern",[479,483,484],{},"Import the enrichers I need from 'evlog\u002Fenrichers' (createUserAgentEnricher, createGeoEnricher, createRequestSizeEnricher, createTraceContextEnricher)",[479,486,487],{},"For Nuxt\u002FNitro: register them on the evlog:enrich hook in a server plugin",[479,489,490,491,495],{},"For Hono\u002FExpress\u002FFastify\u002FElysia\u002FNestJS: pass them as { enrichers: ",[492,493,494],"span",{},"..."," } to the middleware",[479,497,498,499,501],{},"For Standalone: pass them to initLogger({ enrichers: ",[492,500,494],{}," })",[479,503,504],{},"Enrichers run after emit and before the drain — they only add fields, never throw",[479,506,507],{},"Pass { overwrite: true } if I want enrichers to override fields I set manually",[461,509,510,511,517,518],{},"Docs: ",[512,513,514],"a",{"href":514,"rel":515},"https:\u002F\u002Fwww.evlog.dev\u002Fenrichers\u002Foverview",[516],"nofollow","\nBuilt-in: ",[512,519,520],{"href":520,"rel":521},"https:\u002F\u002Fwww.evlog.dev\u002Fenrichers\u002Fbuilt-in",[516],[523,524,526],"h2",{"id":525},"how-enrichers-work","How Enrichers Work",[461,528,529,530,534,535,538],{},"Enrichers hook into the ",[531,532,533],"code",{},"evlog:enrich"," event, which fires after a wide event is emitted and before the ",[531,536,537],{},"evlog:drain"," hook. The enricher receives the event and request metadata, and can mutate the event to add derived fields.",[540,541,546],"pre",{"className":542,"code":544,"language":545},[543],"language-text","Request → emit() → evlog:enrich → evlog:drain\n                    ↑ enrichers      ↑ adapters\n                    add context      send to services\n","text",[531,547,544],{"__ignoreMap":548},"",[550,551,552,766,958,1065],"code-group",{},[540,553,558],{"className":554,"code":555,"filename":556,"language":557,"meta":548,"style":548},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F server\u002Fplugins\u002Fevlog-enrich.ts\nimport { 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","Nuxt \u002F Nitro","typescript",[531,559,560,568,605,612,644,673,678,718,750,758],{"__ignoreMap":548},[492,561,564],{"class":562,"line":563},"line",1,[492,565,567],{"class":566},"sHwdD","\u002F\u002F server\u002Fplugins\u002Fevlog-enrich.ts\n",[492,569,571,575,579,583,586,589,592,595,598,602],{"class":562,"line":570},2,[492,572,574],{"class":573},"s7zQu","import",[492,576,578],{"class":577},"sMK4o"," {",[492,580,582],{"class":581},"sTEyZ"," createUserAgentEnricher",[492,584,585],{"class":577},",",[492,587,588],{"class":581}," createGeoEnricher",[492,590,591],{"class":577}," }",[492,593,594],{"class":573}," from",[492,596,597],{"class":577}," '",[492,599,601],{"class":600},"sfazB","evlog\u002Fenrichers",[492,603,604],{"class":577},"'\n",[492,606,608],{"class":562,"line":607},3,[492,609,611],{"emptyLinePlaceholder":610},true,"\n",[492,613,615,618,621,625,628,630,634,637,641],{"class":562,"line":614},4,[492,616,617],{"class":573},"export",[492,619,620],{"class":573}," default",[492,622,624],{"class":623},"s2Zo4"," defineNitroPlugin",[492,626,627],{"class":581},"(",[492,629,627],{"class":577},[492,631,633],{"class":632},"sHdIc","nitroApp",[492,635,636],{"class":577},")",[492,638,640],{"class":639},"spNyl"," =>",[492,642,643],{"class":577}," {\n",[492,645,647,650,653,656,660,663,666,668,670],{"class":562,"line":646},5,[492,648,649],{"class":639},"  const",[492,651,652],{"class":581}," enrichers",[492,654,655],{"class":577}," =",[492,657,659],{"class":658},"swJcz"," [",[492,661,662],{"class":623},"createUserAgentEnricher",[492,664,665],{"class":658},"()",[492,667,585],{"class":577},[492,669,588],{"class":623},[492,671,672],{"class":658},"()]\n",[492,674,676],{"class":562,"line":675},6,[492,677,611],{"emptyLinePlaceholder":610},[492,679,681,684,687,690,692,695,697,700,702,704,706,709,712,714,716],{"class":562,"line":680},7,[492,682,683],{"class":581},"  nitroApp",[492,685,686],{"class":577},".",[492,688,689],{"class":581},"hooks",[492,691,686],{"class":577},[492,693,694],{"class":623},"hook",[492,696,627],{"class":658},[492,698,699],{"class":577},"'",[492,701,533],{"class":600},[492,703,699],{"class":577},[492,705,585],{"class":577},[492,707,708],{"class":577}," (",[492,710,711],{"class":632},"ctx",[492,713,636],{"class":577},[492,715,640],{"class":639},[492,717,643],{"class":577},[492,719,721,724,726,729,732,735,737,740,743,745,747],{"class":562,"line":720},8,[492,722,723],{"class":573},"    for",[492,725,708],{"class":658},[492,727,728],{"class":639},"const",[492,730,731],{"class":581}," enricher",[492,733,734],{"class":577}," of",[492,736,652],{"class":581},[492,738,739],{"class":658},") ",[492,741,742],{"class":623},"enricher",[492,744,627],{"class":658},[492,746,711],{"class":581},[492,748,749],{"class":658},")\n",[492,751,753,756],{"class":562,"line":752},9,[492,754,755],{"class":577},"  }",[492,757,749],{"class":658},[492,759,761,764],{"class":562,"line":760},10,[492,762,763],{"class":577},"}",[492,765,749],{"class":581},[540,767,769],{"className":554,"code":768,"filename":216,"language":557,"meta":548,"style":548},"\u002F\u002F lib\u002Fevlog.ts\nimport { createEvlog } from 'evlog\u002Fnext'\nimport { createUserAgentEnricher, createGeoEnricher } from 'evlog\u002Fenrichers'\n\nconst enrichers = [createUserAgentEnricher(), createGeoEnricher()]\n\nexport const { withEvlog, useLogger, log, createError } = createEvlog({\n  service: 'my-app',\n  enrich: (ctx) => {\n    for (const enricher of enrichers) enricher(ctx)\n  },\n})\n",[531,770,771,776,796,818,822,844,848,886,904,921,945,951],{"__ignoreMap":548},[492,772,773],{"class":562,"line":563},[492,774,775],{"class":566},"\u002F\u002F lib\u002Fevlog.ts\n",[492,777,778,780,782,785,787,789,791,794],{"class":562,"line":570},[492,779,574],{"class":573},[492,781,578],{"class":577},[492,783,784],{"class":581}," createEvlog",[492,786,591],{"class":577},[492,788,594],{"class":573},[492,790,597],{"class":577},[492,792,793],{"class":600},"evlog\u002Fnext",[492,795,604],{"class":577},[492,797,798,800,802,804,806,808,810,812,814,816],{"class":562,"line":607},[492,799,574],{"class":573},[492,801,578],{"class":577},[492,803,582],{"class":581},[492,805,585],{"class":577},[492,807,588],{"class":581},[492,809,591],{"class":577},[492,811,594],{"class":573},[492,813,597],{"class":577},[492,815,601],{"class":600},[492,817,604],{"class":577},[492,819,820],{"class":562,"line":614},[492,821,611],{"emptyLinePlaceholder":610},[492,823,824,826,829,832,834,836,838,840,842],{"class":562,"line":646},[492,825,728],{"class":639},[492,827,828],{"class":581}," enrichers ",[492,830,831],{"class":577},"=",[492,833,659],{"class":581},[492,835,662],{"class":623},[492,837,665],{"class":581},[492,839,585],{"class":577},[492,841,588],{"class":623},[492,843,672],{"class":581},[492,845,846],{"class":562,"line":675},[492,847,611],{"emptyLinePlaceholder":610},[492,849,850,852,855,857,860,862,865,867,870,872,875,877,879,881,883],{"class":562,"line":680},[492,851,617],{"class":573},[492,853,854],{"class":639}," const",[492,856,578],{"class":577},[492,858,859],{"class":581}," withEvlog",[492,861,585],{"class":577},[492,863,864],{"class":581}," useLogger",[492,866,585],{"class":577},[492,868,869],{"class":581}," log",[492,871,585],{"class":577},[492,873,874],{"class":581}," createError ",[492,876,763],{"class":577},[492,878,655],{"class":577},[492,880,784],{"class":623},[492,882,627],{"class":581},[492,884,885],{"class":577},"{\n",[492,887,888,891,894,896,899,901],{"class":562,"line":720},[492,889,890],{"class":658},"  service",[492,892,893],{"class":577},":",[492,895,597],{"class":577},[492,897,898],{"class":600},"my-app",[492,900,699],{"class":577},[492,902,903],{"class":577},",\n",[492,905,906,909,911,913,915,917,919],{"class":562,"line":752},[492,907,908],{"class":623},"  enrich",[492,910,893],{"class":577},[492,912,708],{"class":577},[492,914,711],{"class":632},[492,916,636],{"class":577},[492,918,640],{"class":639},[492,920,643],{"class":577},[492,922,923,925,927,929,931,933,935,937,939,941,943],{"class":562,"line":760},[492,924,723],{"class":573},[492,926,708],{"class":658},[492,928,728],{"class":639},[492,930,731],{"class":581},[492,932,734],{"class":577},[492,934,652],{"class":581},[492,936,739],{"class":658},[492,938,742],{"class":623},[492,940,627],{"class":658},[492,942,711],{"class":581},[492,944,749],{"class":658},[492,946,948],{"class":562,"line":947},11,[492,949,950],{"class":577},"  },\n",[492,952,954,956],{"class":562,"line":953},12,[492,955,763],{"class":577},[492,957,749],{"class":581},[540,959,962],{"className":554,"code":960,"filename":961,"language":557,"meta":548,"style":548},"\u002F\u002F Pass `enrichers` to the framework's evlog middleware\u002Fmodule\nimport { createUserAgentEnricher, createGeoEnricher } from 'evlog\u002Fenrichers'\n\nconst enrichers = [createUserAgentEnricher(), createGeoEnricher()]\n\napp.use(evlog({ enrichers })) \u002F\u002F Hono \u002F Express \u002F Elysia\n\u002F\u002F await app.register(evlog, { enrichers }) \u002F\u002F Fastify\n\u002F\u002F EvlogModule.forRoot({ enrichers }) \u002F\u002F NestJS\n","Hono \u002F Express \u002F Fastify \u002F Elysia \u002F NestJS",[531,963,964,969,991,995,1015,1019,1049,1057],{"__ignoreMap":548},[492,965,966],{"class":562,"line":563},[492,967,968],{"class":566},"\u002F\u002F Pass `enrichers` to the framework's evlog middleware\u002Fmodule\n",[492,970,971,973,975,977,979,981,983,985,987,989],{"class":562,"line":570},[492,972,574],{"class":573},[492,974,578],{"class":577},[492,976,582],{"class":581},[492,978,585],{"class":577},[492,980,588],{"class":581},[492,982,591],{"class":577},[492,984,594],{"class":573},[492,986,597],{"class":577},[492,988,601],{"class":600},[492,990,604],{"class":577},[492,992,993],{"class":562,"line":607},[492,994,611],{"emptyLinePlaceholder":610},[492,996,997,999,1001,1003,1005,1007,1009,1011,1013],{"class":562,"line":614},[492,998,728],{"class":639},[492,1000,828],{"class":581},[492,1002,831],{"class":577},[492,1004,659],{"class":581},[492,1006,662],{"class":623},[492,1008,665],{"class":581},[492,1010,585],{"class":577},[492,1012,588],{"class":623},[492,1014,672],{"class":581},[492,1016,1017],{"class":562,"line":646},[492,1018,611],{"emptyLinePlaceholder":610},[492,1020,1021,1024,1026,1029,1031,1034,1036,1039,1041,1043,1046],{"class":562,"line":675},[492,1022,1023],{"class":581},"app",[492,1025,686],{"class":577},[492,1027,1028],{"class":623},"use",[492,1030,627],{"class":581},[492,1032,1033],{"class":623},"evlog",[492,1035,627],{"class":581},[492,1037,1038],{"class":577},"{",[492,1040,828],{"class":581},[492,1042,763],{"class":577},[492,1044,1045],{"class":581},")) ",[492,1047,1048],{"class":566},"\u002F\u002F Hono \u002F Express \u002F Elysia\n",[492,1050,1051,1054],{"class":562,"line":680},[492,1052,1053],{"class":566},"\u002F\u002F await app.register(evlog, { enrichers })",[492,1055,1056],{"class":566}," \u002F\u002F Fastify\n",[492,1058,1059,1062],{"class":562,"line":720},[492,1060,1061],{"class":566},"\u002F\u002F EvlogModule.forRoot({ enrichers })",[492,1063,1064],{"class":566}," \u002F\u002F NestJS\n",[540,1066,1068],{"className":554,"code":1067,"filename":271,"language":557,"meta":548,"style":548},"\u002F\u002F index.ts\nimport { initLogger } from 'evlog'\nimport { createUserAgentEnricher, createGeoEnricher } from 'evlog\u002Fenrichers'\n\ninitLogger({\n  enrichers: [createUserAgentEnricher(), createGeoEnricher()],\n})\n",[531,1069,1070,1075,1094,1116,1120,1129,1151],{"__ignoreMap":548},[492,1071,1072],{"class":562,"line":563},[492,1073,1074],{"class":566},"\u002F\u002F index.ts\n",[492,1076,1077,1079,1081,1084,1086,1088,1090,1092],{"class":562,"line":570},[492,1078,574],{"class":573},[492,1080,578],{"class":577},[492,1082,1083],{"class":581}," initLogger",[492,1085,591],{"class":577},[492,1087,594],{"class":573},[492,1089,597],{"class":577},[492,1091,1033],{"class":600},[492,1093,604],{"class":577},[492,1095,1096,1098,1100,1102,1104,1106,1108,1110,1112,1114],{"class":562,"line":607},[492,1097,574],{"class":573},[492,1099,578],{"class":577},[492,1101,582],{"class":581},[492,1103,585],{"class":577},[492,1105,588],{"class":581},[492,1107,591],{"class":577},[492,1109,594],{"class":573},[492,1111,597],{"class":577},[492,1113,601],{"class":600},[492,1115,604],{"class":577},[492,1117,1118],{"class":562,"line":614},[492,1119,611],{"emptyLinePlaceholder":610},[492,1121,1122,1125,1127],{"class":562,"line":646},[492,1123,1124],{"class":623},"initLogger",[492,1126,627],{"class":581},[492,1128,885],{"class":577},[492,1130,1131,1134,1136,1138,1140,1142,1144,1146,1149],{"class":562,"line":675},[492,1132,1133],{"class":658},"  enrichers",[492,1135,893],{"class":577},[492,1137,659],{"class":581},[492,1139,662],{"class":623},[492,1141,665],{"class":581},[492,1143,585],{"class":577},[492,1145,588],{"class":623},[492,1147,1148],{"class":581},"()]",[492,1150,903],{"class":577},[492,1152,1153,1155],{"class":562,"line":680},[492,1154,763],{"class":577},[492,1156,749],{"class":581},[523,1158,1160],{"id":1159},"enrich-context","Enrich Context",[461,1162,1163,1164,1167],{},"Every enricher receives an ",[531,1165,1166],{},"EnrichContext"," with:",[1169,1170,1171,1187],"table",{},[1172,1173,1174],"thead",{},[1175,1176,1177,1181,1184],"tr",{},[1178,1179,1180],"th",{},"Field",[1178,1182,1183],{},"Type",[1178,1185,1186],{},"Description",[1188,1189,1190,1206,1231,1245],"tbody",{},[1175,1191,1192,1198,1203],{},[1193,1194,1195],"td",{},[531,1196,1197],{},"event",[1193,1199,1200],{},[531,1201,1202],{},"WideEvent",[1193,1204,1205],{},"The emitted wide event (mutable)",[1175,1207,1208,1213,1218],{},[1193,1209,1210],{},[531,1211,1212],{},"request",[1193,1214,1215],{},[531,1216,1217],{},"object",[1193,1219,1220,1221,1224,1225,1224,1228,636],{},"Request metadata (",[531,1222,1223],{},"method",", ",[531,1226,1227],{},"path",[531,1229,1230],{},"requestId",[1175,1232,1233,1238,1242],{},[1193,1234,1235],{},[531,1236,1237],{},"headers",[1193,1239,1240],{},[531,1241,1217],{},[1193,1243,1244],{},"Safe HTTP request headers (sensitive headers are filtered)",[1175,1246,1247,1252,1256],{},[1193,1248,1249],{},[531,1250,1251],{},"response",[1193,1253,1254],{},[531,1255,1217],{},[1193,1257,1258,1259,1224,1262,636],{},"Response metadata (",[531,1260,1261],{},"status",[531,1263,1237],{},[1265,1266,1268,1272,1273,1224,1276,1224,1279,1282],"callout",{"color":1267,"icon":129},"success",[1269,1270,1271],"strong",{},"Security:"," Sensitive headers (",[531,1274,1275],{},"authorization",[531,1277,1278],{},"cookie",[531,1280,1281],{},"x-api-key",", etc.) are automatically filtered and never passed to enrichers.",[523,1284,1286],{"id":1285},"available-enrichers","Available Enrichers",[1288,1289,1290,1297,1303,1308,1314],"card-group",{},[1291,1292,1296],"card",{"icon":1293,"title":1294,"to":1295},"i-lucide-monitor-smartphone","User Agent","\u002Fenrichers\u002Fbuilt-in#user-agent","Parse browser, OS, and device type from the User-Agent header.",[1291,1298,1302],{"icon":1299,"title":1300,"to":1301},"i-lucide-map-pin","Geo","\u002Fenrichers\u002Fbuilt-in#geo","Extract country, region, city, and coordinates from platform headers.",[1291,1304,1307],{"icon":409,"title":1305,"to":1306},"Request Size","\u002Fenrichers\u002Fbuilt-in#request-size","Capture request and response payload sizes from Content-Length headers.",[1291,1309,1313],{"icon":1310,"title":1311,"to":1312},"i-lucide-route","Trace Context","\u002Fenrichers\u002Fbuilt-in#trace-context","Extract W3C trace context (traceId, spanId) from the traceparent header.",[1291,1315,1316],{"icon":83,"title":451,"to":452},"Write your own enricher for any derived context.",[523,1318,1320],{"id":1319},"overwrite-behavior","Overwrite Behavior",[461,1322,1323,1324,1327,1328,1331],{},"By default, enrichers preserve existing fields. If your application code already sets ",[531,1325,1326],{},"event.userAgent",", the enricher won't overwrite it. Pass ",[531,1329,1330],{},"{ overwrite: true }"," to change this:",[540,1333,1336],{"className":554,"code":1334,"filename":1335,"language":557,"meta":548,"style":548},"createUserAgentEnricher({ overwrite: true })\n","enricher-factory-options.ts",[531,1337,1338],{"__ignoreMap":548},[492,1339,1340,1342,1344,1346,1349,1351,1355,1357],{"class":562,"line":563},[492,1341,662],{"class":623},[492,1343,627],{"class":581},[492,1345,1038],{"class":577},[492,1347,1348],{"class":658}," overwrite",[492,1350,893],{"class":577},[492,1352,1354],{"class":1353},"sfNiH"," true",[492,1356,591],{"class":577},[492,1358,749],{"class":581},[1265,1360,1362,1363,1366],{"color":1361,"icon":83},"neutral","See the ",[512,1364,1365],{"href":217},"Next.js guide"," for a working implementation.",[523,1368,1370],{"id":1369},"next-steps","Next Steps",[476,1372,1373,1379],{},[479,1374,1375,1378],{},[512,1376,1377],{"href":448},"Built-in Enrichers"," - Detailed reference for all built-in enrichers",[479,1380,1381,1384],{},[512,1382,1383],{"href":452},"Custom Enrichers"," - Write your own enrichers",[1386,1387,1388],"style",{},"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 .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}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 .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":548,"searchDepth":570,"depth":570,"links":1390},[1391,1392,1393,1394,1395],{"id":525,"depth":570,"text":526},{"id":1159,"depth":570,"text":1160},{"id":1285,"depth":570,"text":1286},{"id":1319,"depth":570,"text":1320},{"id":1369,"depth":570,"text":1370},"Enrich your wide events with derived context like user agent, geo data, request size, and trace context. Built-in enrichers and custom enricher support.","md",[1399,1401],{"label":1377,"icon":288,"to":448,"color":1361,"variant":1400},"subtle",{"label":1383,"icon":83,"to":452,"color":1361,"variant":1400},{},{"title":41,"icon":28},{"title":456,"description":1396},"6qry8Mhi5iKIoOe7yqKpRd3-IZd7cW2JomqDlpoVA0g",[1407,1409],{"title":434,"path":435,"stem":436,"description":1408,"icon":437,"children":-1},"The evlog\u002Ftoolkit public API — every primitive used to build adapters, enrichers, plugins, and framework integrations.",{"title":447,"path":448,"stem":449,"description":1410,"icon":288,"children":-1},"Reference for all built-in evlog enrichers. Parse user agents, extract geo data, measure request sizes, and capture trace context automatically.",1778340935033]