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