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