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