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