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