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