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