[{"data":1,"prerenderedAt":2090},["ShallowReactive",2],{"navigation_docs":3,"-frameworks-custom-integration":407,"-frameworks-custom-integration-surround":2085},[4,35,159,201,289,304,391],{"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,299],{"title":295,"path":296,"stem":297,"icon":298},"Identity headers","\u002Fbuild-on-top\u002Fidentity-headers","5.build-on-top\u002F1.identity-headers","i-lucide-fingerprint",{"title":300,"path":301,"stem":302,"icon":303},"FS reader","\u002Fbuild-on-top\u002Ffs-reader","5.build-on-top\u002F4.fs-reader","i-lucide-folder-search",{"title":305,"path":306,"stem":307,"children":308,"page":34},"Adapters","\u002Fadapters","6.adapters",[309,312,352,367],{"title":41,"path":310,"stem":311,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":313,"path":314,"stem":315,"children":316,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[317,322,327,332,337,342,347],{"title":318,"path":319,"stem":320,"icon":321},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":323,"path":324,"stem":325,"icon":326},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":328,"path":329,"stem":330,"icon":331},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":333,"path":334,"stem":335,"icon":336},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":338,"path":339,"stem":340,"icon":341},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":343,"path":344,"stem":345,"icon":346},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":348,"path":349,"stem":350,"icon":351},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":353,"path":354,"stem":355,"children":356,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[357,362],{"title":358,"path":359,"stem":360,"icon":361},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":363,"path":364,"stem":365,"icon":366},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":368,"path":369,"stem":370,"children":371,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[372,377,382,386],{"title":373,"path":374,"stem":375,"icon":376},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline","i-lucide-workflow",{"title":378,"path":379,"stem":380,"icon":381},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":383,"path":384,"stem":385,"icon":83},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":387,"path":388,"stem":389,"icon":390},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":392,"path":393,"stem":394,"children":395,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[396,399,403],{"title":41,"path":397,"stem":398,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":400,"path":401,"stem":402,"icon":288},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":404,"path":405,"stem":406,"icon":83},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":408,"title":285,"body":409,"description":2078,"extension":2079,"links":2080,"meta":2081,"navigation":2082,"path":286,"seo":2083,"stem":287,"__hash__":2084},"docs\u002F4.frameworks\u002F17.custom-integration.md",{"type":410,"value":411,"toc":2068},"minimark",[412,421,432,480,485,556,560,793,817,821,836,1654,1665,1672,1675,1737,1740,1744,1757,1867,1881,1885,1888,2011,2022,2026,2064],[413,414,415,416,420],"p",{},"Don't see your framework listed? The ",[417,418,419],"code",{},"evlog\u002Ftoolkit"," package exposes the same building blocks that power every built-in integration (Hono, Express, Fastify, Elysia, NestJS, SvelteKit). Build a full-featured evlog middleware for any HTTP framework in ~30 lines of code.",[422,423,426,427,431],"callout",{"color":424,"icon":425},"warning","i-lucide-flask-conical","The toolkit API is marked as ",[428,429,430],"strong",{},"beta",". The surface is stable (used by all built-in integrations) but may evolve based on community feedback.",[433,434,437,440,471],"prompt",{":actions":435,"description":436,"icon":288},"[\"copy\",\"cursor\",\"windsurf\"]","Build an evlog integration for my framework",[413,438,439],{},"Build an evlog integration for my custom HTTP framework using the toolkit API.",[441,442,443,447,450,453,456,459,462,465,468],"ul",{},[444,445,446],"li",{},"Install evlog: pnpm add evlog",[444,448,449],{},"Import { defineFrameworkIntegration, createLoggerStorage } from 'evlog\u002Ftoolkit' (NOT 'evlog\u002Fshared')",[444,451,452],{},"Pass a manifest: extractRequest(ctx) returning { method, path, headers, requestId? }, attachLogger(ctx, logger), and an optional storage from createLoggerStorage()",[444,454,455],{},"Headers may be either Web Headers or Node IncomingHttpHeaders — defineFrameworkIntegration normalizes both",[444,457,458],{},"In your middleware, call integration.start(ctx, options) which returns { skipped, finish, runWith, logger, middlewareOptions }",[444,460,461],{},"If skipped is true, skip directly to next",[444,463,464],{},"Run downstream handlers inside runWith(() => next()) so AsyncLocalStorage and log.fork() work",[444,466,467],{},"On success: await finish({ status }); on error: await finish({ error }) then re-throw",[444,469,470],{},"Expose drain, enrich, keep, include, exclude, routes, and plugins options",[413,472,473,474],{},"Docs: ",[475,476,477],"a",{"href":477,"rel":478},"https:\u002F\u002Fwww.evlog.dev\u002Fframeworks\u002Fcustom-integration",[479],"nofollow",[481,482,484],"h2",{"id":483},"install","Install",[486,487,488,513,527,541],"code-group",{},[489,490,496],"pre",{"className":491,"code":492,"filename":493,"language":494,"meta":495,"style":495},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm add evlog\n","pnpm","bash","",[417,497,498],{"__ignoreMap":495},[499,500,503,506,510],"span",{"class":501,"line":502},"line",1,[499,504,493],{"class":505},"sBMFI",[499,507,509],{"class":508},"sfazB"," add",[499,511,512],{"class":508}," evlog\n",[489,514,517],{"className":491,"code":515,"filename":516,"language":494,"meta":495,"style":495},"bun add evlog\n","bun",[417,518,519],{"__ignoreMap":495},[499,520,521,523,525],{"class":501,"line":502},[499,522,516],{"class":505},[499,524,509],{"class":508},[499,526,512],{"class":508},[489,528,531],{"className":491,"code":529,"filename":530,"language":494,"meta":495,"style":495},"yarn add evlog\n","yarn",[417,532,533],{"__ignoreMap":495},[499,534,535,537,539],{"class":501,"line":502},[499,536,530],{"class":505},[499,538,509],{"class":508},[499,540,512],{"class":508},[489,542,545],{"className":491,"code":543,"filename":544,"language":494,"meta":495,"style":495},"npm install evlog\n","npm",[417,546,547],{"__ignoreMap":495},[499,548,549,551,554],{"class":501,"line":502},[499,550,544],{"class":505},[499,552,553],{"class":508}," install",[499,555,512],{"class":508},[481,557,559],{"id":558},"whats-in-the-toolkit","What's in the Toolkit",[561,562,563,576],"table",{},[564,565,566],"thead",{},[567,568,569,573],"tr",{},[570,571,572],"th",{},"Export",[570,574,575],{},"Purpose",[577,578,579,590,600,632,645,659,673,690,704,735,745,755,773,783],"tbody",{},[567,580,581,587],{},[582,583,584],"td",{},[417,585,586],{},"defineFrameworkIntegration(spec)",[582,588,589],{},"Manifest factory — extract request, create logger, attach, run with ALS",[567,591,592,597],{},[582,593,594],{},[417,595,596],{},"createMiddlewareLogger(opts)",[582,598,599],{},"Lower-level lifecycle (custom mode)",[567,601,602,607],{},[582,603,604],{},[417,605,606],{},"BaseEvlogOptions",[582,608,609,610,613,614,613,617,613,620,613,623,613,626,613,629],{},"Base user-facing options — ",[417,611,612],{},"drain",", ",[417,615,616],{},"enrich",[417,618,619],{},"keep",[417,621,622],{},"include",[417,624,625],{},"exclude",[417,627,628],{},"routes",[417,630,631],{},"plugins",[567,633,634,639],{},[582,635,636],{},[417,637,638],{},"MiddlewareLoggerResult",[582,640,641,642],{},"Return type: ",[417,643,644],{},"{ logger, finish, skipped }",[567,646,647,652],{},[582,648,649],{},[417,650,651],{},"extractSafeHeaders(headers)",[582,653,654,655,658],{},"Filter sensitive headers from a Web API ",[417,656,657],{},"Headers"," object (used internally)",[567,660,661,666],{},[582,662,663],{},[417,664,665],{},"extractSafeNodeHeaders(headers)",[582,667,668,669,672],{},"Filter sensitive headers from Node.js ",[417,670,671],{},"IncomingHttpHeaders"," (used internally)",[567,674,675,680],{},[582,676,677],{},[417,678,679],{},"createLoggerStorage(hint)",[582,681,682,683,686,687],{},"Factory returning ",[417,684,685],{},"{ storage, useLogger }"," backed by ",[417,688,689],{},"AsyncLocalStorage",[567,691,692,697],{},[582,693,694],{},[417,695,696],{},"defineEvlog(config)",[582,698,699,700,703],{},"Canonical config object — works for ",[417,701,702],{},"initLogger"," and middleware options",[567,705,706,711],{},[582,707,708],{},[417,709,710],{},"definePlugin(plugin)",[582,712,713,714,613,717,613,719,613,721,613,723,613,726,613,729,613,732],{},"Plugin contract — opt into any subset of ",[417,715,716],{},"setup",[417,718,616],{},[417,720,612],{},[417,722,619],{},[417,724,725],{},"onRequestStart",[417,727,728],{},"onRequestFinish",[417,730,731],{},"onClientLog",[417,733,734],{},"extendLogger",[567,736,737,742],{},[582,738,739],{},[417,740,741],{},"composeEnrichers \u002F composeDrains \u002F composeKeep \u002F composePlugins",[582,743,744],{},"Combine multiple extensions into one",[567,746,747,752],{},[582,748,749],{},[417,750,751],{},"defineEnricher(spec)",[582,753,754],{},"Build a single-field enricher with built-in error isolation",[567,756,757,762],{},[582,758,759],{},[417,760,761],{},"defineHttpDrain(spec)",[582,763,764,765,768,769,772],{},"Build an HTTP drain — provide ",[417,766,767],{},"resolve()"," and ",[417,770,771],{},"encode()",", get retries\u002Ftimeout\u002Ferror handling for free",[567,774,775,780],{},[582,776,777],{},[417,778,779],{},"httpPost(opts)",[582,781,782],{},"The same retried POST helper used by every built-in adapter",[567,784,785,790],{},[582,786,787],{},[417,788,789],{},"resolveAdapterConfig(ns, fields, overrides)",[582,791,792],{},"Standard config priority chain (overrides → runtimeConfig → env)",[413,794,795,796,613,799,613,802,613,805,808,809,812,813,816],{},"Types like ",[417,797,798],{},"RequestLogger",[417,800,801],{},"DrainContext",[417,803,804],{},"EnrichContext",[417,806,807],{},"WideEvent",", and ",[417,810,811],{},"TailSamplingContext"," are exported from the main ",[417,814,815],{},"evlog"," package.",[481,818,820],{"id":819},"manifest-mode-recommended","Manifest Mode (recommended)",[413,822,823,824,827,828,831,832,835],{},"Most frameworks fit a ",[417,825,826],{},"(ctx, next)"," middleware shape. For those, write a ",[428,829,830],{},"manifest"," describing how to extract the request and attach the logger — ",[417,833,834],{},"defineFrameworkIntegration"," does the rest.",[489,837,842],{"className":838,"code":839,"filename":840,"language":841,"meta":495,"style":495},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import type { IncomingMessage, ServerResponse } from 'node:http'\nimport {\n  createLoggerStorage,\n  defineFrameworkIntegration,\n  type BaseEvlogOptions,\n} from 'evlog\u002Ftoolkit'\nimport type { RequestLogger } from 'evlog'\n\nexport type MyFrameworkEvlogOptions = BaseEvlogOptions\n\nconst { storage, useLogger } = createLoggerStorage(\n  'middleware context. Make sure evlog middleware is registered before your routes.',\n)\n\nexport { useLogger }\n\nconst integration = defineFrameworkIntegration\u003CIncomingMessage>({\n  name: 'my-framework',\n  extractRequest: (req) => ({\n    method: req.method || 'GET',\n    path: req.url || '\u002F',\n    headers: req.headers,\n    requestId: typeof req.headers['x-request-id'] === 'string'\n      ? req.headers['x-request-id']\n      : undefined,\n  }),\n  attachLogger: (req, logger) => {\n    (req as IncomingMessage & { log: RequestLogger }).log = logger\n  },\n  storage,\n})\n\nexport function evlog(options: MyFrameworkEvlogOptions = {}) {\n  return async (req: IncomingMessage, res: ServerResponse, next: () => Promise\u003Cvoid>) => {\n    const { skipped, finish, runWith } = integration.start(req, options)\n    if (skipped) {\n      await next()\n      return\n    }\n    try {\n      await runWith(() => next())\n      await finish({ status: res.statusCode })\n    } catch (error) {\n      await finish({ error: error as Error })\n      throw error\n    }\n  }\n}\n","my-framework-evlog.ts","typescript",[417,843,844,882,890,899,907,918,932,954,961,979,984,1011,1025,1031,1036,1049,1054,1083,1102,1127,1156,1182,1199,1237,1258,1267,1277,1300,1339,1345,1353,1360,1365,1392,1445,1489,1505,1516,1522,1528,1536,1555,1583,1601,1628,1637,1642,1648],{"__ignoreMap":495},[499,845,846,850,853,857,861,864,867,870,873,876,879],{"class":501,"line":502},[499,847,849],{"class":848},"s7zQu","import",[499,851,852],{"class":848}," type",[499,854,856],{"class":855},"sMK4o"," {",[499,858,860],{"class":859},"sTEyZ"," IncomingMessage",[499,862,863],{"class":855},",",[499,865,866],{"class":859}," ServerResponse",[499,868,869],{"class":855}," }",[499,871,872],{"class":848}," from",[499,874,875],{"class":855}," '",[499,877,878],{"class":508},"node:http",[499,880,881],{"class":855},"'\n",[499,883,885,887],{"class":501,"line":884},2,[499,886,849],{"class":848},[499,888,889],{"class":855}," {\n",[499,891,893,896],{"class":501,"line":892},3,[499,894,895],{"class":859},"  createLoggerStorage",[499,897,898],{"class":855},",\n",[499,900,902,905],{"class":501,"line":901},4,[499,903,904],{"class":859},"  defineFrameworkIntegration",[499,906,898],{"class":855},[499,908,910,913,916],{"class":501,"line":909},5,[499,911,912],{"class":848},"  type",[499,914,915],{"class":859}," BaseEvlogOptions",[499,917,898],{"class":855},[499,919,921,924,926,928,930],{"class":501,"line":920},6,[499,922,923],{"class":855},"}",[499,925,872],{"class":848},[499,927,875],{"class":855},[499,929,419],{"class":508},[499,931,881],{"class":855},[499,933,935,937,939,941,944,946,948,950,952],{"class":501,"line":934},7,[499,936,849],{"class":848},[499,938,852],{"class":848},[499,940,856],{"class":855},[499,942,943],{"class":859}," RequestLogger",[499,945,869],{"class":855},[499,947,872],{"class":848},[499,949,875],{"class":855},[499,951,815],{"class":508},[499,953,881],{"class":855},[499,955,957],{"class":501,"line":956},8,[499,958,960],{"emptyLinePlaceholder":959},true,"\n",[499,962,964,967,970,973,976],{"class":501,"line":963},9,[499,965,966],{"class":848},"export",[499,968,852],{"class":969},"spNyl",[499,971,972],{"class":505}," MyFrameworkEvlogOptions",[499,974,975],{"class":855}," =",[499,977,978],{"class":505}," BaseEvlogOptions\n",[499,980,982],{"class":501,"line":981},10,[499,983,960],{"emptyLinePlaceholder":959},[499,985,987,990,992,995,997,1000,1002,1004,1008],{"class":501,"line":986},11,[499,988,989],{"class":969},"const",[499,991,856],{"class":855},[499,993,994],{"class":859}," storage",[499,996,863],{"class":855},[499,998,999],{"class":859}," useLogger ",[499,1001,923],{"class":855},[499,1003,975],{"class":855},[499,1005,1007],{"class":1006},"s2Zo4"," createLoggerStorage",[499,1009,1010],{"class":859},"(\n",[499,1012,1014,1017,1020,1023],{"class":501,"line":1013},12,[499,1015,1016],{"class":855},"  '",[499,1018,1019],{"class":508},"middleware context. Make sure evlog middleware is registered before your routes.",[499,1021,1022],{"class":855},"'",[499,1024,898],{"class":855},[499,1026,1028],{"class":501,"line":1027},13,[499,1029,1030],{"class":859},")\n",[499,1032,1034],{"class":501,"line":1033},14,[499,1035,960],{"emptyLinePlaceholder":959},[499,1037,1039,1041,1043,1046],{"class":501,"line":1038},15,[499,1040,966],{"class":848},[499,1042,856],{"class":855},[499,1044,1045],{"class":859}," useLogger",[499,1047,1048],{"class":855}," }\n",[499,1050,1052],{"class":501,"line":1051},16,[499,1053,960],{"emptyLinePlaceholder":959},[499,1055,1057,1059,1062,1065,1068,1071,1074,1077,1080],{"class":501,"line":1056},17,[499,1058,989],{"class":969},[499,1060,1061],{"class":859}," integration ",[499,1063,1064],{"class":855},"=",[499,1066,1067],{"class":1006}," defineFrameworkIntegration",[499,1069,1070],{"class":855},"\u003C",[499,1072,1073],{"class":505},"IncomingMessage",[499,1075,1076],{"class":855},">",[499,1078,1079],{"class":859},"(",[499,1081,1082],{"class":855},"{\n",[499,1084,1086,1090,1093,1095,1098,1100],{"class":501,"line":1085},18,[499,1087,1089],{"class":1088},"swJcz","  name",[499,1091,1092],{"class":855},":",[499,1094,875],{"class":855},[499,1096,1097],{"class":508},"my-framework",[499,1099,1022],{"class":855},[499,1101,898],{"class":855},[499,1103,1105,1108,1110,1113,1117,1120,1123,1125],{"class":501,"line":1104},19,[499,1106,1107],{"class":1006},"  extractRequest",[499,1109,1092],{"class":855},[499,1111,1112],{"class":855}," (",[499,1114,1116],{"class":1115},"sHdIc","req",[499,1118,1119],{"class":855},")",[499,1121,1122],{"class":969}," =>",[499,1124,1112],{"class":859},[499,1126,1082],{"class":855},[499,1128,1130,1133,1135,1138,1141,1144,1147,1149,1152,1154],{"class":501,"line":1129},20,[499,1131,1132],{"class":1088},"    method",[499,1134,1092],{"class":855},[499,1136,1137],{"class":859}," req",[499,1139,1140],{"class":855},".",[499,1142,1143],{"class":859},"method ",[499,1145,1146],{"class":855},"||",[499,1148,875],{"class":855},[499,1150,1151],{"class":508},"GET",[499,1153,1022],{"class":855},[499,1155,898],{"class":855},[499,1157,1159,1162,1164,1166,1168,1171,1173,1175,1178,1180],{"class":501,"line":1158},21,[499,1160,1161],{"class":1088},"    path",[499,1163,1092],{"class":855},[499,1165,1137],{"class":859},[499,1167,1140],{"class":855},[499,1169,1170],{"class":859},"url ",[499,1172,1146],{"class":855},[499,1174,875],{"class":855},[499,1176,1177],{"class":508},"\u002F",[499,1179,1022],{"class":855},[499,1181,898],{"class":855},[499,1183,1185,1188,1190,1192,1194,1197],{"class":501,"line":1184},22,[499,1186,1187],{"class":1088},"    headers",[499,1189,1092],{"class":855},[499,1191,1137],{"class":859},[499,1193,1140],{"class":855},[499,1195,1196],{"class":859},"headers",[499,1198,898],{"class":855},[499,1200,1202,1205,1207,1210,1212,1214,1217,1219,1222,1224,1227,1230,1232,1235],{"class":501,"line":1201},23,[499,1203,1204],{"class":1088},"    requestId",[499,1206,1092],{"class":855},[499,1208,1209],{"class":855}," typeof",[499,1211,1137],{"class":859},[499,1213,1140],{"class":855},[499,1215,1216],{"class":859},"headers[",[499,1218,1022],{"class":855},[499,1220,1221],{"class":508},"x-request-id",[499,1223,1022],{"class":855},[499,1225,1226],{"class":859},"] ",[499,1228,1229],{"class":855},"===",[499,1231,875],{"class":855},[499,1233,1234],{"class":508},"string",[499,1236,881],{"class":855},[499,1238,1240,1243,1245,1247,1249,1251,1253,1255],{"class":501,"line":1239},24,[499,1241,1242],{"class":855},"      ?",[499,1244,1137],{"class":859},[499,1246,1140],{"class":855},[499,1248,1216],{"class":859},[499,1250,1022],{"class":855},[499,1252,1221],{"class":508},[499,1254,1022],{"class":855},[499,1256,1257],{"class":859},"]\n",[499,1259,1261,1264],{"class":501,"line":1260},25,[499,1262,1263],{"class":855},"      :",[499,1265,1266],{"class":855}," undefined,\n",[499,1268,1270,1273,1275],{"class":501,"line":1269},26,[499,1271,1272],{"class":855},"  }",[499,1274,1119],{"class":859},[499,1276,898],{"class":855},[499,1278,1280,1283,1285,1287,1289,1291,1294,1296,1298],{"class":501,"line":1279},27,[499,1281,1282],{"class":1006},"  attachLogger",[499,1284,1092],{"class":855},[499,1286,1112],{"class":855},[499,1288,1116],{"class":1115},[499,1290,863],{"class":855},[499,1292,1293],{"class":1115}," logger",[499,1295,1119],{"class":855},[499,1297,1122],{"class":969},[499,1299,889],{"class":855},[499,1301,1303,1306,1308,1311,1313,1316,1318,1321,1323,1325,1327,1329,1331,1334,1336],{"class":501,"line":1302},28,[499,1304,1305],{"class":1088},"    (",[499,1307,1116],{"class":859},[499,1309,1310],{"class":848}," as",[499,1312,860],{"class":505},[499,1314,1315],{"class":855}," &",[499,1317,856],{"class":855},[499,1319,1320],{"class":1088}," log",[499,1322,1092],{"class":855},[499,1324,943],{"class":505},[499,1326,869],{"class":855},[499,1328,1119],{"class":1088},[499,1330,1140],{"class":855},[499,1332,1333],{"class":859},"log",[499,1335,975],{"class":855},[499,1337,1338],{"class":859}," logger\n",[499,1340,1342],{"class":501,"line":1341},29,[499,1343,1344],{"class":855},"  },\n",[499,1346,1348,1351],{"class":501,"line":1347},30,[499,1349,1350],{"class":859},"  storage",[499,1352,898],{"class":855},[499,1354,1356,1358],{"class":501,"line":1355},31,[499,1357,923],{"class":855},[499,1359,1030],{"class":859},[499,1361,1363],{"class":501,"line":1362},32,[499,1364,960],{"emptyLinePlaceholder":959},[499,1366,1368,1370,1373,1376,1378,1381,1383,1385,1387,1390],{"class":501,"line":1367},33,[499,1369,966],{"class":848},[499,1371,1372],{"class":969}," function",[499,1374,1375],{"class":1006}," evlog",[499,1377,1079],{"class":855},[499,1379,1380],{"class":1115},"options",[499,1382,1092],{"class":855},[499,1384,972],{"class":505},[499,1386,975],{"class":855},[499,1388,1389],{"class":855}," {})",[499,1391,889],{"class":855},[499,1393,1395,1398,1401,1403,1405,1407,1409,1411,1414,1416,1418,1420,1423,1425,1428,1430,1433,1435,1438,1441,1443],{"class":501,"line":1394},34,[499,1396,1397],{"class":848},"  return",[499,1399,1400],{"class":969}," async",[499,1402,1112],{"class":855},[499,1404,1116],{"class":1115},[499,1406,1092],{"class":855},[499,1408,860],{"class":505},[499,1410,863],{"class":855},[499,1412,1413],{"class":1115}," res",[499,1415,1092],{"class":855},[499,1417,866],{"class":505},[499,1419,863],{"class":855},[499,1421,1422],{"class":1006}," next",[499,1424,1092],{"class":855},[499,1426,1427],{"class":855}," ()",[499,1429,1122],{"class":969},[499,1431,1432],{"class":505}," Promise",[499,1434,1070],{"class":855},[499,1436,1437],{"class":505},"void",[499,1439,1440],{"class":855},">)",[499,1442,1122],{"class":969},[499,1444,889],{"class":855},[499,1446,1448,1451,1453,1456,1458,1461,1463,1466,1468,1470,1473,1475,1478,1480,1482,1484,1487],{"class":501,"line":1447},35,[499,1449,1450],{"class":969},"    const",[499,1452,856],{"class":855},[499,1454,1455],{"class":859}," skipped",[499,1457,863],{"class":855},[499,1459,1460],{"class":859}," finish",[499,1462,863],{"class":855},[499,1464,1465],{"class":859}," runWith",[499,1467,869],{"class":855},[499,1469,975],{"class":855},[499,1471,1472],{"class":859}," integration",[499,1474,1140],{"class":855},[499,1476,1477],{"class":1006},"start",[499,1479,1079],{"class":1088},[499,1481,1116],{"class":859},[499,1483,863],{"class":855},[499,1485,1486],{"class":859}," options",[499,1488,1030],{"class":1088},[499,1490,1492,1495,1497,1500,1503],{"class":501,"line":1491},36,[499,1493,1494],{"class":848},"    if",[499,1496,1112],{"class":1088},[499,1498,1499],{"class":859},"skipped",[499,1501,1502],{"class":1088},") ",[499,1504,1082],{"class":855},[499,1506,1508,1511,1513],{"class":501,"line":1507},37,[499,1509,1510],{"class":848},"      await",[499,1512,1422],{"class":1006},[499,1514,1515],{"class":1088},"()\n",[499,1517,1519],{"class":501,"line":1518},38,[499,1520,1521],{"class":848},"      return\n",[499,1523,1525],{"class":501,"line":1524},39,[499,1526,1527],{"class":855},"    }\n",[499,1529,1531,1534],{"class":501,"line":1530},40,[499,1532,1533],{"class":848},"    try",[499,1535,889],{"class":855},[499,1537,1539,1541,1543,1545,1548,1550,1552],{"class":501,"line":1538},41,[499,1540,1510],{"class":848},[499,1542,1465],{"class":1006},[499,1544,1079],{"class":1088},[499,1546,1547],{"class":855},"()",[499,1549,1122],{"class":969},[499,1551,1422],{"class":1006},[499,1553,1554],{"class":1088},"())\n",[499,1556,1558,1560,1562,1564,1567,1570,1572,1574,1576,1579,1581],{"class":501,"line":1557},42,[499,1559,1510],{"class":848},[499,1561,1460],{"class":1006},[499,1563,1079],{"class":1088},[499,1565,1566],{"class":855},"{",[499,1568,1569],{"class":1088}," status",[499,1571,1092],{"class":855},[499,1573,1413],{"class":859},[499,1575,1140],{"class":855},[499,1577,1578],{"class":859},"statusCode",[499,1580,869],{"class":855},[499,1582,1030],{"class":1088},[499,1584,1586,1589,1592,1594,1597,1599],{"class":501,"line":1585},43,[499,1587,1588],{"class":855},"    }",[499,1590,1591],{"class":848}," catch",[499,1593,1112],{"class":1088},[499,1595,1596],{"class":859},"error",[499,1598,1502],{"class":1088},[499,1600,1082],{"class":855},[499,1602,1604,1606,1608,1610,1612,1615,1617,1619,1621,1624,1626],{"class":501,"line":1603},44,[499,1605,1510],{"class":848},[499,1607,1460],{"class":1006},[499,1609,1079],{"class":1088},[499,1611,1566],{"class":855},[499,1613,1614],{"class":1088}," error",[499,1616,1092],{"class":855},[499,1618,1614],{"class":859},[499,1620,1310],{"class":848},[499,1622,1623],{"class":505}," Error",[499,1625,869],{"class":855},[499,1627,1030],{"class":1088},[499,1629,1631,1634],{"class":501,"line":1630},45,[499,1632,1633],{"class":848},"      throw",[499,1635,1636],{"class":859}," error\n",[499,1638,1640],{"class":501,"line":1639},46,[499,1641,1527],{"class":855},[499,1643,1645],{"class":501,"line":1644},47,[499,1646,1647],{"class":855},"  }\n",[499,1649,1651],{"class":501,"line":1650},48,[499,1652,1653],{"class":855},"}\n",[413,1655,1656,1657,1660,1661,1664],{},"That's it. This middleware gets ",[428,1658,1659],{},"every feature"," for free: route filtering, drain adapters, enrichers, tail sampling, error capture, plugin lifecycle hooks, ",[417,1662,1663],{},"log.fork()",", and duration tracking.",[481,1666,1668,1669,1671],{"id":1667},"what-defineframeworkintegration-does","What ",[417,1670,834],{}," does",[413,1673,1674],{},"Given the manifest above, the helper:",[1676,1677,1678,1687,1698,1705,1710,1720],"ol",{},[444,1679,1680,1681,1683,1684,1686],{},"Normalizes headers (auto-detects ",[417,1682,657],{}," vs ",[417,1685,671],{},").",[444,1688,1689,1690,1693,1694,1697],{},"Generates a ",[417,1691,1692],{},"requestId"," if ",[417,1695,1696],{},"extractRequest"," doesn't return one.",[444,1699,1700,1701,1704],{},"Calls ",[417,1702,1703],{},"createMiddlewareLogger"," with the merged options.",[444,1706,1700,1707,1140],{},[417,1708,1709],{},"attachLogger(ctx, logger)",[444,1711,1712,1713,1715,1716,1719],{},"Attaches ",[417,1714,1663],{}," to the logger when ",[417,1717,1718],{},"storage"," is provided (so users can spawn correlated background work).",[444,1721,1722,1723,1726,1727,1730,1731,1734,1735,1140],{},"Exposes ",[417,1724,1725],{},"runWith(fn)"," — runs ",[417,1728,1729],{},"fn()"," inside ",[417,1732,1733],{},"storage.run(logger, …)"," if storage is configured, otherwise just calls ",[417,1736,1729],{},[413,1738,1739],{},"You're left with only the framework-specific glue: where to read the request from, where to attach the logger, and how to compute the response status.",[481,1741,1743],{"id":1742},"custom-mode","Custom Mode",[413,1745,1746,1747,1749,1750,1753,1754,1756],{},"If your framework's lifecycle doesn't fit a clean ",[417,1748,826],{}," shape (NestJS interceptors, Next.js App Router, SvelteKit ",[417,1751,1752],{},"handle","), drop one level lower and call ",[417,1755,1703],{}," directly:",[489,1758,1760],{"className":838,"code":1759,"language":841,"meta":495,"style":495},"import { createMiddlewareLogger, extractSafeNodeHeaders } from 'evlog\u002Ftoolkit'\n\nconst { logger, finish, skipped } = createMiddlewareLogger({\n  method,\n  path,\n  requestId,\n  headers: extractSafeNodeHeaders(rawHeaders),\n  ...options,\n})\n",[417,1761,1762,1786,1790,1817,1824,1831,1838,1852,1861],{"__ignoreMap":495},[499,1763,1764,1766,1768,1771,1773,1776,1778,1780,1782,1784],{"class":501,"line":502},[499,1765,849],{"class":848},[499,1767,856],{"class":855},[499,1769,1770],{"class":859}," createMiddlewareLogger",[499,1772,863],{"class":855},[499,1774,1775],{"class":859}," extractSafeNodeHeaders",[499,1777,869],{"class":855},[499,1779,872],{"class":848},[499,1781,875],{"class":855},[499,1783,419],{"class":508},[499,1785,881],{"class":855},[499,1787,1788],{"class":501,"line":884},[499,1789,960],{"emptyLinePlaceholder":959},[499,1791,1792,1794,1796,1798,1800,1802,1804,1807,1809,1811,1813,1815],{"class":501,"line":892},[499,1793,989],{"class":969},[499,1795,856],{"class":855},[499,1797,1293],{"class":859},[499,1799,863],{"class":855},[499,1801,1460],{"class":859},[499,1803,863],{"class":855},[499,1805,1806],{"class":859}," skipped ",[499,1808,923],{"class":855},[499,1810,975],{"class":855},[499,1812,1770],{"class":1006},[499,1814,1079],{"class":859},[499,1816,1082],{"class":855},[499,1818,1819,1822],{"class":501,"line":901},[499,1820,1821],{"class":859},"  method",[499,1823,898],{"class":855},[499,1825,1826,1829],{"class":501,"line":909},[499,1827,1828],{"class":859},"  path",[499,1830,898],{"class":855},[499,1832,1833,1836],{"class":501,"line":920},[499,1834,1835],{"class":859},"  requestId",[499,1837,898],{"class":855},[499,1839,1840,1843,1845,1847,1850],{"class":501,"line":934},[499,1841,1842],{"class":1088},"  headers",[499,1844,1092],{"class":855},[499,1846,1775],{"class":1006},[499,1848,1849],{"class":859},"(rawHeaders)",[499,1851,898],{"class":855},[499,1853,1854,1857,1859],{"class":501,"line":956},[499,1855,1856],{"class":855},"  ...",[499,1858,1380],{"class":859},[499,1860,898],{"class":855},[499,1862,1863,1865],{"class":501,"line":963},[499,1864,923],{"class":855},[499,1866,1030],{"class":859},[413,1868,1869,1870,1873,1874,1876,1877,1880],{},"You'll be responsible for ALS wrapping (",[417,1871,1872],{},"storage.run","), ",[417,1875,1663],{}," attachment (via ",[417,1878,1879],{},"attachForkToLogger","), and finishing the lifecycle — but you keep the full pipeline (route filtering, sampling, emit, enrich, drain, plugins) for free.",[481,1882,1884],{"id":1883},"reference-implementations","Reference Implementations",[413,1886,1887],{},"Study these built-in integrations for framework-specific patterns:",[561,1889,1890,1906],{},[564,1891,1892],{},[567,1893,1894,1897,1900,1903],{},[570,1895,1896],{},"Framework",[570,1898,1899],{},"Lines",[570,1901,1902],{},"Mode",[570,1904,1905],{},"Source",[577,1907,1908,1924,1940,1957,1974,1991],{},[567,1909,1910,1912,1915,1917],{},[582,1911,246],{},[582,1913,1914],{},"~50",[582,1916,830],{},[582,1918,1919],{},[475,1920,1923],{"href":1921,"rel":1922},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Fblob\u002Fmain\u002Fpackages\u002Fevlog\u002Fsrc\u002Fhono\u002Findex.ts",[479],"hono\u002Findex.ts",[567,1925,1926,1928,1930,1933],{},[582,1927,241],{},[582,1929,1914],{},[582,1931,1932],{},"manifest + ALS",[582,1934,1935],{},[475,1936,1939],{"href":1937,"rel":1938},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Fblob\u002Fmain\u002Fpackages\u002Fevlog\u002Fsrc\u002Fexpress\u002Findex.ts",[479],"express\u002Findex.ts",[567,1941,1942,1944,1947,1950],{},[582,1943,251],{},[582,1945,1946],{},"~70",[582,1948,1949],{},"manifest + Fastify hooks",[582,1951,1952],{},[475,1953,1956],{"href":1954,"rel":1955},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Fblob\u002Fmain\u002Fpackages\u002Fevlog\u002Fsrc\u002Ffastify\u002Findex.ts",[479],"fastify\u002Findex.ts",[567,1958,1959,1961,1964,1967],{},[582,1960,256],{},[582,1962,1963],{},"~80",[582,1965,1966],{},"manifest + custom ALS scoping",[582,1968,1969],{},[475,1970,1973],{"href":1971,"rel":1972},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Fblob\u002Fmain\u002Fpackages\u002Fevlog\u002Fsrc\u002Felysia\u002Findex.ts",[479],"elysia\u002Findex.ts",[567,1975,1976,1978,1981,1984],{},[582,1977,236],{},[582,1979,1980],{},"~120",[582,1982,1983],{},"custom (interceptor)",[582,1985,1986],{},[475,1987,1990],{"href":1988,"rel":1989},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Fblob\u002Fmain\u002Fpackages\u002Fevlog\u002Fsrc\u002Fnestjs\u002F",[479],"nestjs\u002F",[567,1992,1993,1995,1998,2004],{},[582,1994,221],{},[582,1996,1997],{},"~90",[582,1999,2000,2001,2003],{},"custom (",[417,2002,1752],{}," hook)",[582,2005,2006],{},[475,2007,2010],{"href":2008,"rel":2009},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Fblob\u002Fmain\u002Fpackages\u002Fevlog\u002Fsrc\u002Fsveltekit\u002F",[479],"sveltekit\u002F",[422,2012,2015,2016,2021],{"color":2013,"icon":2014},"neutral","i-lucide-heart","Built an integration for a framework we don't support? ",[475,2017,2020],{"href":2018,"rel":2019},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Fpulls",[479],"Open a PR"," — the community will thank you.",[481,2023,2025],{"id":2024},"next-steps","Next Steps",[441,2027,2028,2034,2039,2044,2049],{},[444,2029,2030,2033],{},[475,2031,2032],{"href":384},"Toolkit reference",": All toolkit primitives in one place",[444,2035,2036,2038],{},[475,2037,51],{"href":52},": Design comprehensive events with context layering",[444,2040,2041,2043],{},[475,2042,305],{"href":310},": Send logs to Axiom, Sentry, PostHog, and more",[444,2045,2046,2048],{},[475,2047,175],{"href":176},": Control log volume with head and tail sampling",[444,2050,2051,2053,2054,613,2057,808,2060,2063],{},[475,2052,56],{"href":57},": Throw errors with ",[417,2055,2056],{},"why",[417,2058,2059],{},"fix",[417,2061,2062],{},"link"," fields",[2065,2066,2067],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}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}",{"title":495,"searchDepth":884,"depth":884,"links":2069},[2070,2071,2072,2073,2075,2076,2077],{"id":483,"depth":884,"text":484},{"id":558,"depth":884,"text":559},{"id":819,"depth":884,"text":820},{"id":1667,"depth":884,"text":2074},"What defineFrameworkIntegration does",{"id":1742,"depth":884,"text":1743},{"id":1883,"depth":884,"text":1884},{"id":2024,"depth":884,"text":2025},"Build your own evlog framework integration using the toolkit API — defineFrameworkIntegration, createMiddlewareLogger, AsyncLocalStorage, and the full drain\u002Fenrich\u002Fkeep pipeline.","md",null,{},{"title":285,"icon":288},{"title":285,"description":2078},"hFyqHOT3DNCdm7622iffV7YpdLA3wqtBUHBZyDwQJXc",[2086,2088],{"title":280,"path":281,"stem":282,"description":2087,"icon":283,"children":-1},"Wide events and structured logging in AWS Lambda functions, including SQS consumers and event-driven handlers.",{"title":295,"path":296,"stem":297,"description":2089,"icon":298,"children":-1},"Every drain request sent by evlog is tagged with a User-Agent and an X-Evlog-Source header so receivers can identify the traffic.",1778327041742]