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