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