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