[{"data":1,"prerenderedAt":1345},["ShallowReactive",2],{"navigation_docs":3,"-enrichers-overview":388,"-enrichers-overview-surround":1340},[4,35,155,197,285,372],{"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,94,122],{"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},"Client Logging","\u002Flogging\u002Fclient-logging","2.logging\u002F4.client-logging","i-lucide-monitor",{"title":66,"icon":67,"path":68,"stem":69,"children":70,"page":34},"AI SDK","i-simple-icons-vercel","\u002Flogging\u002Fai-sdk","2.logging\u002F5.ai-sdk",[71,74,79,84,89],{"title":41,"path":72,"stem":73,"icon":44},"\u002Flogging\u002Fai-sdk\u002Foverview","2.logging\u002F5.ai-sdk\u002F01.overview",{"title":75,"path":76,"stem":77,"icon":78},"Usage","\u002Flogging\u002Fai-sdk\u002Fusage","2.logging\u002F5.ai-sdk\u002F02.usage","i-lucide-code",{"title":80,"path":81,"stem":82,"icon":83},"Options","\u002Flogging\u002Fai-sdk\u002Foptions","2.logging\u002F5.ai-sdk\u002F03.options","i-lucide-sliders",{"title":85,"path":86,"stem":87,"icon":88},"Metadata","\u002Flogging\u002Fai-sdk\u002Fmetadata","2.logging\u002F5.ai-sdk\u002F04.metadata","i-lucide-database",{"title":90,"path":91,"stem":92,"icon":93},"Telemetry","\u002Flogging\u002Fai-sdk\u002Ftelemetry","2.logging\u002F5.ai-sdk\u002F05.telemetry","i-lucide-activity",{"title":95,"icon":96,"path":97,"stem":98,"children":99,"page":34},"Better Auth","i-simple-icons-betterauth","\u002Flogging\u002Fbetter-auth","2.logging\u002F6.better-auth",[100,103,108,113,117],{"title":41,"path":101,"stem":102,"icon":44},"\u002Flogging\u002Fbetter-auth\u002Foverview","2.logging\u002F6.better-auth\u002F01.overview",{"title":104,"path":105,"stem":106,"icon":107},"Identify User","\u002Flogging\u002Fbetter-auth\u002Fidentify-user","2.logging\u002F6.better-auth\u002F02.identify-user","i-lucide-user-check",{"title":109,"path":110,"stem":111,"icon":112},"Middleware","\u002Flogging\u002Fbetter-auth\u002Fmiddleware","2.logging\u002F6.better-auth\u002F03.middleware","i-lucide-shield",{"title":114,"path":115,"stem":116,"icon":64},"Client Sync","\u002Flogging\u002Fbetter-auth\u002Fclient-sync","2.logging\u002F6.better-auth\u002F04.client-sync",{"title":118,"path":119,"stem":120,"icon":121},"Performance","\u002Flogging\u002Fbetter-auth\u002Fperformance","2.logging\u002F6.better-auth\u002F05.performance","i-lucide-gauge",{"title":123,"icon":124,"path":125,"stem":126,"children":127,"page":34},"Audit Logs","i-lucide-shield-check","\u002Flogging\u002Faudit","2.logging\u002F7.audit",[128,131,136,141,146,150],{"title":41,"path":129,"stem":130,"icon":44},"\u002Flogging\u002Faudit\u002Foverview","2.logging\u002F7.audit\u002F01.overview",{"title":132,"path":133,"stem":134,"icon":135},"Schema","\u002Flogging\u002Faudit\u002Fschema","2.logging\u002F7.audit\u002F02.schema","i-lucide-file-text",{"title":137,"path":138,"stem":139,"icon":140},"Recording","\u002Flogging\u002Faudit\u002Frecording","2.logging\u002F7.audit\u002F03.recording","i-lucide-pen-line",{"title":142,"path":143,"stem":144,"icon":145},"Drains","\u002Flogging\u002Faudit\u002Fpipeline","2.logging\u002F7.audit\u002F04.pipeline","i-lucide-link",{"title":147,"path":148,"stem":149,"icon":124},"Compliance","\u002Flogging\u002Faudit\u002Fcompliance","2.logging\u002F7.audit\u002F05.compliance",{"title":151,"path":152,"stem":153,"icon":154},"Recipes","\u002Flogging\u002Faudit\u002Frecipes","2.logging\u002F7.audit\u002F06.recipes","i-lucide-book-open",{"title":156,"path":157,"stem":158,"children":159,"page":34},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[160,165,170,175,180,184,187,192],{"title":161,"path":162,"stem":163,"icon":164},"Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":166,"path":167,"stem":168,"icon":169},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F1.configuration","i-lucide-settings",{"title":171,"path":172,"stem":173,"icon":174},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F2.sampling","i-lucide-filter",{"title":176,"path":177,"stem":178,"icon":179},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F3.typed-fields","i-simple-icons-typescript",{"title":181,"path":182,"stem":183,"icon":124},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F4.best-practices",{"title":118,"path":185,"stem":186,"icon":121},"\u002Fcore-concepts\u002Fperformance","3.core-concepts\u002F5.performance",{"title":188,"path":189,"stem":190,"icon":191},"Vite Plugin","\u002Fcore-concepts\u002Fvite-plugin","3.core-concepts\u002F6.vite-plugin","i-custom-vite",{"title":193,"path":194,"stem":195,"icon":196},"Auto-Redaction","\u002Fcore-concepts\u002Fredaction","3.core-concepts\u002F7.redaction","i-lucide-eye-off",{"title":198,"path":199,"stem":200,"children":201,"page":34},"Frameworks","\u002Fframeworks","4.frameworks",[202,206,211,216,221,226,231,236,241,246,251,256,261,266,270,275,280],{"title":41,"path":203,"stem":204,"icon":205},"\u002Fframeworks\u002Foverview","4.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":207,"path":208,"stem":209,"icon":210},"Nuxt","\u002Fframeworks\u002Fnuxt","4.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":212,"path":213,"stem":214,"icon":215},"Next.js","\u002Fframeworks\u002Fnextjs","4.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":217,"path":218,"stem":219,"icon":220},"SvelteKit","\u002Fframeworks\u002Fsveltekit","4.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":222,"path":223,"stem":224,"icon":225},"Nitro","\u002Fframeworks\u002Fnitro","4.frameworks\u002F04.nitro","i-custom-nitro",{"title":227,"path":228,"stem":229,"icon":230},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","4.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":232,"path":233,"stem":234,"icon":235},"NestJS","\u002Fframeworks\u002Fnestjs","4.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":237,"path":238,"stem":239,"icon":240},"Express","\u002Fframeworks\u002Fexpress","4.frameworks\u002F07.express","i-simple-icons-express",{"title":242,"path":243,"stem":244,"icon":245},"Hono","\u002Fframeworks\u002Fhono","4.frameworks\u002F08.hono","i-simple-icons-hono",{"title":247,"path":248,"stem":249,"icon":250},"Fastify","\u002Fframeworks\u002Ffastify","4.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":252,"path":253,"stem":254,"icon":255},"Elysia","\u002Fframeworks\u002Felysia","4.frameworks\u002F10.elysia","i-custom-elysia",{"title":257,"path":258,"stem":259,"icon":260},"React Router","\u002Fframeworks\u002Freact-router","4.frameworks\u002F11.react-router","i-custom-reactrouter",{"title":262,"path":263,"stem":264,"icon":265},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","4.frameworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":267,"path":268,"stem":269,"icon":179},"Standalone","\u002Fframeworks\u002Fstandalone","4.frameworks\u002F13.standalone",{"title":271,"path":272,"stem":273,"icon":274},"Astro","\u002Fframeworks\u002Fastro","4.frameworks\u002F14.astro","i-simple-icons-astro",{"title":276,"path":277,"stem":278,"icon":279},"AWS Lambda","\u002Fframeworks\u002Faws-lambda","4.frameworks\u002F16.aws-lambda","i-custom-lambda",{"title":281,"path":282,"stem":283,"icon":284},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","4.frameworks\u002F17.custom-integration","i-lucide-puzzle",{"title":286,"path":287,"stem":288,"children":289,"page":34},"Adapters","\u002Fadapters","6.adapters",[290,293,333,348],{"title":41,"path":291,"stem":292,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":294,"path":295,"stem":296,"children":297,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[298,303,308,313,318,323,328],{"title":299,"path":300,"stem":301,"icon":302},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":304,"path":305,"stem":306,"icon":307},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":309,"path":310,"stem":311,"icon":312},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":314,"path":315,"stem":316,"icon":317},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":319,"path":320,"stem":321,"icon":322},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":324,"path":325,"stem":326,"icon":327},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":329,"path":330,"stem":331,"icon":332},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":334,"path":335,"stem":336,"children":337,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[338,343],{"title":339,"path":340,"stem":341,"icon":342},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":344,"path":345,"stem":346,"icon":347},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":349,"path":350,"stem":351,"children":352,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[353,358,363,367],{"title":354,"path":355,"stem":356,"icon":357},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline","i-lucide-workflow",{"title":359,"path":360,"stem":361,"icon":362},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":364,"path":365,"stem":366,"icon":78},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":368,"path":369,"stem":370,"icon":371},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":373,"path":374,"stem":375,"children":376,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[377,380,384],{"title":41,"path":378,"stem":379,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":381,"path":382,"stem":383,"icon":284},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":385,"path":386,"stem":387,"icon":78},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":389,"title":390,"body":391,"description":1330,"extension":1331,"links":1332,"meta":1336,"navigation":1337,"path":378,"seo":1338,"stem":379,"__hash__":1339},"docs\u002F7.enrichers\u002F1.overview.md","Enrichers Overview",{"type":392,"value":393,"toc":1323},"minimark",[394,398,401,456,461,473,483,1091,1095,1102,1198,1217,1221,1251,1255,1266,1293,1301,1305,1319],[395,396,397],"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.",[399,400],"enricher-chain",{},[402,403,406,409,442],"prompt",{":actions":404,"description":405,"icon":28},"[\"copy\",\"cursor\",\"windsurf\"]","Add evlog enrichers to my app",[395,407,408],{},"Add evlog enrichers to my app so wide events automatically include derived context.",[410,411,412,416,419,422,430,436,439],"ul",{},[413,414,415],"li",{},"Identify my framework and follow its evlog wiring pattern",[413,417,418],{},"Import the enrichers I need from 'evlog\u002Fenrichers' (createUserAgentEnricher, createGeoEnricher, createRequestSizeEnricher, createTraceContextEnricher)",[413,420,421],{},"For Nuxt\u002FNitro: register them on the evlog:enrich hook in a server plugin",[413,423,424,425,429],{},"For Hono\u002FExpress\u002FFastify\u002FElysia\u002FNestJS: pass them as { enrichers: ",[426,427,428],"span",{},"..."," } to the middleware",[413,431,432,433,435],{},"For Standalone: pass them to initLogger({ enrichers: ",[426,434,428],{}," })",[413,437,438],{},"Enrichers run after emit and before the drain — they only add fields, never throw",[413,440,441],{},"Pass { overwrite: true } if I want enrichers to override fields I set manually",[395,443,444,445,451,452],{},"Docs: ",[446,447,448],"a",{"href":448,"rel":449},"https:\u002F\u002Fwww.evlog.dev\u002Fenrichers\u002Foverview",[450],"nofollow","\nBuilt-in: ",[446,453,454],{"href":454,"rel":455},"https:\u002F\u002Fwww.evlog.dev\u002Fenrichers\u002Fbuilt-in",[450],[457,458,460],"h2",{"id":459},"how-enrichers-work","How Enrichers Work",[395,462,463,464,468,469,472],{},"Enrichers hook into the ",[465,466,467],"code",{},"evlog:enrich"," event, which fires after a wide event is emitted and before the ",[465,470,471],{},"evlog:drain"," hook. The enricher receives the event and request metadata, and can mutate the event to add derived fields.",[474,475,480],"pre",{"className":476,"code":478,"language":479},[477],"language-text","Request → emit() → evlog:enrich → evlog:drain\n                    ↑ enrichers      ↑ adapters\n                    add context      send to services\n","text",[465,481,478],{"__ignoreMap":482},"",[484,485,486,700,892,999],"code-group",{},[474,487,492],{"className":488,"code":489,"filename":490,"language":491,"meta":482,"style":482},"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",[465,493,494,502,539,546,578,607,612,652,684,692],{"__ignoreMap":482},[426,495,498],{"class":496,"line":497},"line",1,[426,499,501],{"class":500},"sHwdD","\u002F\u002F server\u002Fplugins\u002Fevlog-enrich.ts\n",[426,503,505,509,513,517,520,523,526,529,532,536],{"class":496,"line":504},2,[426,506,508],{"class":507},"s7zQu","import",[426,510,512],{"class":511},"sMK4o"," {",[426,514,516],{"class":515},"sTEyZ"," createUserAgentEnricher",[426,518,519],{"class":511},",",[426,521,522],{"class":515}," createGeoEnricher",[426,524,525],{"class":511}," }",[426,527,528],{"class":507}," from",[426,530,531],{"class":511}," '",[426,533,535],{"class":534},"sfazB","evlog\u002Fenrichers",[426,537,538],{"class":511},"'\n",[426,540,542],{"class":496,"line":541},3,[426,543,545],{"emptyLinePlaceholder":544},true,"\n",[426,547,549,552,555,559,562,564,568,571,575],{"class":496,"line":548},4,[426,550,551],{"class":507},"export",[426,553,554],{"class":507}," default",[426,556,558],{"class":557},"s2Zo4"," defineNitroPlugin",[426,560,561],{"class":515},"(",[426,563,561],{"class":511},[426,565,567],{"class":566},"sHdIc","nitroApp",[426,569,570],{"class":511},")",[426,572,574],{"class":573},"spNyl"," =>",[426,576,577],{"class":511}," {\n",[426,579,581,584,587,590,594,597,600,602,604],{"class":496,"line":580},5,[426,582,583],{"class":573},"  const",[426,585,586],{"class":515}," enrichers",[426,588,589],{"class":511}," =",[426,591,593],{"class":592},"swJcz"," [",[426,595,596],{"class":557},"createUserAgentEnricher",[426,598,599],{"class":592},"()",[426,601,519],{"class":511},[426,603,522],{"class":557},[426,605,606],{"class":592},"()]\n",[426,608,610],{"class":496,"line":609},6,[426,611,545],{"emptyLinePlaceholder":544},[426,613,615,618,621,624,626,629,631,634,636,638,640,643,646,648,650],{"class":496,"line":614},7,[426,616,617],{"class":515},"  nitroApp",[426,619,620],{"class":511},".",[426,622,623],{"class":515},"hooks",[426,625,620],{"class":511},[426,627,628],{"class":557},"hook",[426,630,561],{"class":592},[426,632,633],{"class":511},"'",[426,635,467],{"class":534},[426,637,633],{"class":511},[426,639,519],{"class":511},[426,641,642],{"class":511}," (",[426,644,645],{"class":566},"ctx",[426,647,570],{"class":511},[426,649,574],{"class":573},[426,651,577],{"class":511},[426,653,655,658,660,663,666,669,671,674,677,679,681],{"class":496,"line":654},8,[426,656,657],{"class":507},"    for",[426,659,642],{"class":592},[426,661,662],{"class":573},"const",[426,664,665],{"class":515}," enricher",[426,667,668],{"class":511}," of",[426,670,586],{"class":515},[426,672,673],{"class":592},") ",[426,675,676],{"class":557},"enricher",[426,678,561],{"class":592},[426,680,645],{"class":515},[426,682,683],{"class":592},")\n",[426,685,687,690],{"class":496,"line":686},9,[426,688,689],{"class":511},"  }",[426,691,683],{"class":592},[426,693,695,698],{"class":496,"line":694},10,[426,696,697],{"class":511},"}",[426,699,683],{"class":515},[474,701,703],{"className":488,"code":702,"filename":212,"language":491,"meta":482,"style":482},"\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",[465,704,705,710,730,752,756,778,782,820,838,855,879,885],{"__ignoreMap":482},[426,706,707],{"class":496,"line":497},[426,708,709],{"class":500},"\u002F\u002F lib\u002Fevlog.ts\n",[426,711,712,714,716,719,721,723,725,728],{"class":496,"line":504},[426,713,508],{"class":507},[426,715,512],{"class":511},[426,717,718],{"class":515}," createEvlog",[426,720,525],{"class":511},[426,722,528],{"class":507},[426,724,531],{"class":511},[426,726,727],{"class":534},"evlog\u002Fnext",[426,729,538],{"class":511},[426,731,732,734,736,738,740,742,744,746,748,750],{"class":496,"line":541},[426,733,508],{"class":507},[426,735,512],{"class":511},[426,737,516],{"class":515},[426,739,519],{"class":511},[426,741,522],{"class":515},[426,743,525],{"class":511},[426,745,528],{"class":507},[426,747,531],{"class":511},[426,749,535],{"class":534},[426,751,538],{"class":511},[426,753,754],{"class":496,"line":548},[426,755,545],{"emptyLinePlaceholder":544},[426,757,758,760,763,766,768,770,772,774,776],{"class":496,"line":580},[426,759,662],{"class":573},[426,761,762],{"class":515}," enrichers ",[426,764,765],{"class":511},"=",[426,767,593],{"class":515},[426,769,596],{"class":557},[426,771,599],{"class":515},[426,773,519],{"class":511},[426,775,522],{"class":557},[426,777,606],{"class":515},[426,779,780],{"class":496,"line":609},[426,781,545],{"emptyLinePlaceholder":544},[426,783,784,786,789,791,794,796,799,801,804,806,809,811,813,815,817],{"class":496,"line":614},[426,785,551],{"class":507},[426,787,788],{"class":573}," const",[426,790,512],{"class":511},[426,792,793],{"class":515}," withEvlog",[426,795,519],{"class":511},[426,797,798],{"class":515}," useLogger",[426,800,519],{"class":511},[426,802,803],{"class":515}," log",[426,805,519],{"class":511},[426,807,808],{"class":515}," createError ",[426,810,697],{"class":511},[426,812,589],{"class":511},[426,814,718],{"class":557},[426,816,561],{"class":515},[426,818,819],{"class":511},"{\n",[426,821,822,825,828,830,833,835],{"class":496,"line":654},[426,823,824],{"class":592},"  service",[426,826,827],{"class":511},":",[426,829,531],{"class":511},[426,831,832],{"class":534},"my-app",[426,834,633],{"class":511},[426,836,837],{"class":511},",\n",[426,839,840,843,845,847,849,851,853],{"class":496,"line":686},[426,841,842],{"class":557},"  enrich",[426,844,827],{"class":511},[426,846,642],{"class":511},[426,848,645],{"class":566},[426,850,570],{"class":511},[426,852,574],{"class":573},[426,854,577],{"class":511},[426,856,857,859,861,863,865,867,869,871,873,875,877],{"class":496,"line":694},[426,858,657],{"class":507},[426,860,642],{"class":592},[426,862,662],{"class":573},[426,864,665],{"class":515},[426,866,668],{"class":511},[426,868,586],{"class":515},[426,870,673],{"class":592},[426,872,676],{"class":557},[426,874,561],{"class":592},[426,876,645],{"class":515},[426,878,683],{"class":592},[426,880,882],{"class":496,"line":881},11,[426,883,884],{"class":511},"  },\n",[426,886,888,890],{"class":496,"line":887},12,[426,889,697],{"class":511},[426,891,683],{"class":515},[474,893,896],{"className":488,"code":894,"filename":895,"language":491,"meta":482,"style":482},"\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",[465,897,898,903,925,929,949,953,983,991],{"__ignoreMap":482},[426,899,900],{"class":496,"line":497},[426,901,902],{"class":500},"\u002F\u002F Pass `enrichers` to the framework's evlog middleware\u002Fmodule\n",[426,904,905,907,909,911,913,915,917,919,921,923],{"class":496,"line":504},[426,906,508],{"class":507},[426,908,512],{"class":511},[426,910,516],{"class":515},[426,912,519],{"class":511},[426,914,522],{"class":515},[426,916,525],{"class":511},[426,918,528],{"class":507},[426,920,531],{"class":511},[426,922,535],{"class":534},[426,924,538],{"class":511},[426,926,927],{"class":496,"line":541},[426,928,545],{"emptyLinePlaceholder":544},[426,930,931,933,935,937,939,941,943,945,947],{"class":496,"line":548},[426,932,662],{"class":573},[426,934,762],{"class":515},[426,936,765],{"class":511},[426,938,593],{"class":515},[426,940,596],{"class":557},[426,942,599],{"class":515},[426,944,519],{"class":511},[426,946,522],{"class":557},[426,948,606],{"class":515},[426,950,951],{"class":496,"line":580},[426,952,545],{"emptyLinePlaceholder":544},[426,954,955,958,960,963,965,968,970,973,975,977,980],{"class":496,"line":609},[426,956,957],{"class":515},"app",[426,959,620],{"class":511},[426,961,962],{"class":557},"use",[426,964,561],{"class":515},[426,966,967],{"class":557},"evlog",[426,969,561],{"class":515},[426,971,972],{"class":511},"{",[426,974,762],{"class":515},[426,976,697],{"class":511},[426,978,979],{"class":515},")) ",[426,981,982],{"class":500},"\u002F\u002F Hono \u002F Express \u002F Elysia\n",[426,984,985,988],{"class":496,"line":614},[426,986,987],{"class":500},"\u002F\u002F await app.register(evlog, { enrichers })",[426,989,990],{"class":500}," \u002F\u002F Fastify\n",[426,992,993,996],{"class":496,"line":654},[426,994,995],{"class":500},"\u002F\u002F EvlogModule.forRoot({ enrichers })",[426,997,998],{"class":500}," \u002F\u002F NestJS\n",[474,1000,1002],{"className":488,"code":1001,"filename":267,"language":491,"meta":482,"style":482},"\u002F\u002F index.ts\nimport { initLogger } from 'evlog'\nimport { createUserAgentEnricher, createGeoEnricher } from 'evlog\u002Fenrichers'\n\ninitLogger({\n  enrichers: [createUserAgentEnricher(), createGeoEnricher()],\n})\n",[465,1003,1004,1009,1028,1050,1054,1063,1085],{"__ignoreMap":482},[426,1005,1006],{"class":496,"line":497},[426,1007,1008],{"class":500},"\u002F\u002F index.ts\n",[426,1010,1011,1013,1015,1018,1020,1022,1024,1026],{"class":496,"line":504},[426,1012,508],{"class":507},[426,1014,512],{"class":511},[426,1016,1017],{"class":515}," initLogger",[426,1019,525],{"class":511},[426,1021,528],{"class":507},[426,1023,531],{"class":511},[426,1025,967],{"class":534},[426,1027,538],{"class":511},[426,1029,1030,1032,1034,1036,1038,1040,1042,1044,1046,1048],{"class":496,"line":541},[426,1031,508],{"class":507},[426,1033,512],{"class":511},[426,1035,516],{"class":515},[426,1037,519],{"class":511},[426,1039,522],{"class":515},[426,1041,525],{"class":511},[426,1043,528],{"class":507},[426,1045,531],{"class":511},[426,1047,535],{"class":534},[426,1049,538],{"class":511},[426,1051,1052],{"class":496,"line":548},[426,1053,545],{"emptyLinePlaceholder":544},[426,1055,1056,1059,1061],{"class":496,"line":580},[426,1057,1058],{"class":557},"initLogger",[426,1060,561],{"class":515},[426,1062,819],{"class":511},[426,1064,1065,1068,1070,1072,1074,1076,1078,1080,1083],{"class":496,"line":609},[426,1066,1067],{"class":592},"  enrichers",[426,1069,827],{"class":511},[426,1071,593],{"class":515},[426,1073,596],{"class":557},[426,1075,599],{"class":515},[426,1077,519],{"class":511},[426,1079,522],{"class":557},[426,1081,1082],{"class":515},"()]",[426,1084,837],{"class":511},[426,1086,1087,1089],{"class":496,"line":614},[426,1088,697],{"class":511},[426,1090,683],{"class":515},[457,1092,1094],{"id":1093},"enrich-context","Enrich Context",[395,1096,1097,1098,1101],{},"Every enricher receives an ",[465,1099,1100],{},"EnrichContext"," with:",[1103,1104,1105,1121],"table",{},[1106,1107,1108],"thead",{},[1109,1110,1111,1115,1118],"tr",{},[1112,1113,1114],"th",{},"Field",[1112,1116,1117],{},"Type",[1112,1119,1120],{},"Description",[1122,1123,1124,1140,1165,1179],"tbody",{},[1109,1125,1126,1132,1137],{},[1127,1128,1129],"td",{},[465,1130,1131],{},"event",[1127,1133,1134],{},[465,1135,1136],{},"WideEvent",[1127,1138,1139],{},"The emitted wide event (mutable)",[1109,1141,1142,1147,1152],{},[1127,1143,1144],{},[465,1145,1146],{},"request",[1127,1148,1149],{},[465,1150,1151],{},"object",[1127,1153,1154,1155,1158,1159,1158,1162,570],{},"Request metadata (",[465,1156,1157],{},"method",", ",[465,1160,1161],{},"path",[465,1163,1164],{},"requestId",[1109,1166,1167,1172,1176],{},[1127,1168,1169],{},[465,1170,1171],{},"headers",[1127,1173,1174],{},[465,1175,1151],{},[1127,1177,1178],{},"Safe HTTP request headers (sensitive headers are filtered)",[1109,1180,1181,1186,1190],{},[1127,1182,1183],{},[465,1184,1185],{},"response",[1127,1187,1188],{},[465,1189,1151],{},[1127,1191,1192,1193,1158,1196,570],{},"Response metadata (",[465,1194,1195],{},"status",[465,1197,1171],{},[1199,1200,1202,1206,1207,1158,1210,1158,1213,1216],"callout",{"color":1201,"icon":124},"success",[1203,1204,1205],"strong",{},"Security:"," Sensitive headers (",[465,1208,1209],{},"authorization",[465,1211,1212],{},"cookie",[465,1214,1215],{},"x-api-key",", etc.) are automatically filtered and never passed to enrichers.",[457,1218,1220],{"id":1219},"available-enrichers","Available Enrichers",[1222,1223,1224,1231,1237,1242,1248],"card-group",{},[1225,1226,1230],"card",{"icon":1227,"title":1228,"to":1229},"i-lucide-monitor-smartphone","User Agent","\u002Fenrichers\u002Fbuilt-in#user-agent","Parse browser, OS, and device type from the User-Agent header.",[1225,1232,1236],{"icon":1233,"title":1234,"to":1235},"i-lucide-map-pin","Geo","\u002Fenrichers\u002Fbuilt-in#geo","Extract country, region, city, and coordinates from platform headers.",[1225,1238,1241],{"icon":342,"title":1239,"to":1240},"Request Size","\u002Fenrichers\u002Fbuilt-in#request-size","Capture request and response payload sizes from Content-Length headers.",[1225,1243,1247],{"icon":1244,"title":1245,"to":1246},"i-lucide-route","Trace Context","\u002Fenrichers\u002Fbuilt-in#trace-context","Extract W3C trace context (traceId, spanId) from the traceparent header.",[1225,1249,1250],{"icon":78,"title":385,"to":386},"Write your own enricher for any derived context.",[457,1252,1254],{"id":1253},"overwrite-behavior","Overwrite Behavior",[395,1256,1257,1258,1261,1262,1265],{},"By default, enrichers preserve existing fields. If your application code already sets ",[465,1259,1260],{},"event.userAgent",", the enricher won't overwrite it. Pass ",[465,1263,1264],{},"{ overwrite: true }"," to change this:",[474,1267,1270],{"className":488,"code":1268,"filename":1269,"language":491,"meta":482,"style":482},"createUserAgentEnricher({ overwrite: true })\n","enricher-factory-options.ts",[465,1271,1272],{"__ignoreMap":482},[426,1273,1274,1276,1278,1280,1283,1285,1289,1291],{"class":496,"line":497},[426,1275,596],{"class":557},[426,1277,561],{"class":515},[426,1279,972],{"class":511},[426,1281,1282],{"class":592}," overwrite",[426,1284,827],{"class":511},[426,1286,1288],{"class":1287},"sfNiH"," true",[426,1290,525],{"class":511},[426,1292,683],{"class":515},[1199,1294,1296,1297,1300],{"color":1295,"icon":78},"neutral","See the ",[446,1298,1299],{"href":213},"Next.js guide"," for a working implementation.",[457,1302,1304],{"id":1303},"next-steps","Next Steps",[410,1306,1307,1313],{},[413,1308,1309,1312],{},[446,1310,1311],{"href":382},"Built-in Enrichers"," - Detailed reference for all built-in enrichers",[413,1314,1315,1318],{},[446,1316,1317],{"href":386},"Custom Enrichers"," - Write your own enrichers",[1320,1321,1322],"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":482,"searchDepth":504,"depth":504,"links":1324},[1325,1326,1327,1328,1329],{"id":459,"depth":504,"text":460},{"id":1093,"depth":504,"text":1094},{"id":1219,"depth":504,"text":1220},{"id":1253,"depth":504,"text":1254},{"id":1303,"depth":504,"text":1304},"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",[1333,1335],{"label":1311,"icon":284,"to":382,"color":1295,"variant":1334},"subtle",{"label":1317,"icon":78,"to":386,"color":1295,"variant":1334},{},{"title":41,"icon":28},{"title":390,"description":1330},"6qry8Mhi5iKIoOe7yqKpRd3-IZd7cW2JomqDlpoVA0g",[1341,1343],{"title":368,"path":369,"stem":370,"description":1342,"icon":371,"children":-1},"The evlog\u002Ftoolkit public API — every primitive used to build adapters, enrichers, plugins, and framework integrations.",{"title":381,"path":382,"stem":383,"description":1344,"icon":284,"children":-1},"Reference for all built-in evlog enrichers. Parse user agents, extract geo data, measure request sizes, and capture trace context automatically.",1777983053272]