[{"data":1,"prerenderedAt":2245},["ShallowReactive",2],{"navigation_docs":3,"-adapters-building-blocks-http":308,"-adapters-building-blocks-http-surround":2240},[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":310,"body":311,"description":2229,"extension":2230,"links":2231,"meta":2236,"navigation":2237,"path":284,"seo":2238,"stem":285,"__hash__":2239},"docs\u002F6.adapters\u002F04.building-blocks\u002F02.http.md","HTTP drain",{"type":312,"value":313,"toc":2209},"minimark",[314,318,344,397,401,603,607,662,666,673,687,875,881,884,1089,1093,1099,1222,1228,1291,1295,1308,1313,1317,1320,1414,1441,1445,1451,1454,1605,1608,1752,1756,1766,2165,2175,2182,2186,2205],[315,316,317],"p",{},"Most observability tools focus on server-side logs. The HTTP drain gives you a framework-agnostic way to send structured logs from the browser to any HTTP endpoint without any vendor SDK or framework coupling.",[319,320,322,323,327,328,332,333,336,337,340,341,343],"callout",{"color":321,"icon":13},"neutral","The ",[324,325,326],"code",{},"evlog\u002Fbrowser"," import path is ",[329,330,331],"strong",{},"deprecated"," and re-exports the same API as ",[324,334,335],{},"evlog\u002Fhttp",". It will be removed in the next ",[329,338,339],{},"major"," release. Prefer ",[324,342,335],{}," for new code.",[345,346,349,352,385],"prompt",{":actions":347,"description":348,"icon":286},"[\"copy\",\"cursor\",\"windsurf\"]","Set up the HTTP transport for client logs",[315,350,351],{},"Set up the HTTP transport so my browser logs are sent to my server.",[353,354,355,359,362,372,375,378],"ul",{},[356,357,358],"li",{},"Install evlog: pnpm add evlog",[356,360,361],{},"Import createHttpLogDrain from 'evlog\u002Fhttp' (NOT evlog\u002Fbrowser — that's deprecated)",[356,363,364,365,371],{},"Create a drain with { endpoint: '",[366,367,368],"a",{"href":368,"rel":369},"https:\u002F\u002Flogs.example.com\u002Fv1\u002Fingest",[370],"nofollow","' } and an optional pipeline ({ batch: { size, intervalMs } })",[356,373,374],{},"Pass the drain to initLogger({ drain }) on the client side",[356,376,377],{},"The drain batches events and uses fetch keepalive + sendBeacon on visibility change",[356,379,380,381,384],{},"On the server, accept POST requests with a DrainContext",[382,383],"span",{}," body and forward them to my drain pipeline",[315,386,387,388,392,393],{},"Docs: ",[366,389,390],{"href":390,"rel":391},"https:\u002F\u002Fwww.evlog.dev\u002Fadapters\u002Fbuilding-blocks\u002Fhttp",[370],"\nPipeline: ",[366,394,395],{"href":395,"rel":396},"https:\u002F\u002Fwww.evlog.dev\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline",[370],[398,399,20],"h2",{"id":400},"quick-start",[402,403,409],"pre",{"className":404,"code":405,"filename":406,"language":407,"meta":408,"style":408},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { initLogger, log } from 'evlog'\nimport { createHttpLogDrain } from 'evlog\u002Fhttp'\n\nconst drain = createHttpLogDrain({\n  drain: { endpoint: 'https:\u002F\u002Flogs.example.com\u002Fv1\u002Fingest' },\n})\ninitLogger({ drain })\n\nlog.info({ action: 'page_view', path: location.pathname })\n","app.ts","typescript","",[324,410,411,449,469,476,498,525,534,551,556],{"__ignoreMap":408},[382,412,415,419,423,427,430,433,436,439,442,446],{"class":413,"line":414},"line",1,[382,416,418],{"class":417},"s7zQu","import",[382,420,422],{"class":421},"sMK4o"," {",[382,424,426],{"class":425},"sTEyZ"," initLogger",[382,428,429],{"class":421},",",[382,431,432],{"class":425}," log",[382,434,435],{"class":421}," }",[382,437,438],{"class":417}," from",[382,440,441],{"class":421}," '",[382,443,445],{"class":444},"sfazB","evlog",[382,447,448],{"class":421},"'\n",[382,450,452,454,456,459,461,463,465,467],{"class":413,"line":451},2,[382,453,418],{"class":417},[382,455,422],{"class":421},[382,457,458],{"class":425}," createHttpLogDrain",[382,460,435],{"class":421},[382,462,438],{"class":417},[382,464,441],{"class":421},[382,466,335],{"class":444},[382,468,448],{"class":421},[382,470,472],{"class":413,"line":471},3,[382,473,475],{"emptyLinePlaceholder":474},true,"\n",[382,477,479,483,486,489,492,495],{"class":413,"line":478},4,[382,480,482],{"class":481},"spNyl","const",[382,484,485],{"class":425}," drain ",[382,487,488],{"class":421},"=",[382,490,458],{"class":491},"s2Zo4",[382,493,494],{"class":425},"(",[382,496,497],{"class":421},"{\n",[382,499,501,505,508,510,513,515,517,519,522],{"class":413,"line":500},5,[382,502,504],{"class":503},"swJcz","  drain",[382,506,507],{"class":421},":",[382,509,422],{"class":421},[382,511,512],{"class":503}," endpoint",[382,514,507],{"class":421},[382,516,441],{"class":421},[382,518,368],{"class":444},[382,520,521],{"class":421},"'",[382,523,524],{"class":421}," },\n",[382,526,528,531],{"class":413,"line":527},6,[382,529,530],{"class":421},"}",[382,532,533],{"class":425},")\n",[382,535,537,540,542,545,547,549],{"class":413,"line":536},7,[382,538,539],{"class":491},"initLogger",[382,541,494],{"class":425},[382,543,544],{"class":421},"{",[382,546,485],{"class":425},[382,548,530],{"class":421},[382,550,533],{"class":425},[382,552,554],{"class":413,"line":553},8,[382,555,475],{"emptyLinePlaceholder":474},[382,557,559,562,565,568,570,572,575,577,579,582,584,586,589,591,594,596,599,601],{"class":413,"line":558},9,[382,560,561],{"class":425},"log",[382,563,564],{"class":421},".",[382,566,567],{"class":491},"info",[382,569,494],{"class":425},[382,571,544],{"class":421},[382,573,574],{"class":503}," action",[382,576,507],{"class":421},[382,578,441],{"class":421},[382,580,581],{"class":444},"page_view",[382,583,521],{"class":421},[382,585,429],{"class":421},[382,587,588],{"class":503}," path",[382,590,507],{"class":421},[382,592,593],{"class":425}," location",[382,595,564],{"class":421},[382,597,598],{"class":425},"pathname ",[382,600,530],{"class":421},[382,602,533],{"class":425},[398,604,606],{"id":605},"how-it-works","How It Works",[608,609,610,626,633,644,651],"ol",{},[356,611,612,615,616,615,619,622,623],{},[324,613,614],{},"log.info()"," \u002F ",[324,617,618],{},"log.warn()",[324,620,621],{},"log.error()"," push events into a ",[329,624,625],{},"memory buffer",[356,627,628,629,632],{},"Events are ",[329,630,631],{},"batched"," by size (default 25) or time interval (default 2 s)",[356,634,635,636,639,640,643],{},"Batches are sent via ",[324,637,638],{},"fetch"," with ",[324,641,642],{},"keepalive: true"," so requests survive page navigation",[356,645,646,647,650],{},"When the page becomes hidden (tab switch, navigation), buffered events are flushed via ",[324,648,649],{},"navigator.sendBeacon"," as a fallback",[356,652,653,654,657,658,661],{},"Your ",[329,655,656],{},"server endpoint"," receives a ",[324,659,660],{},"DrainContext[]"," JSON array and processes it however you like",[398,663,665],{"id":664},"two-tier-api","Two-Tier API",[667,668,670],"h3",{"id":669},"createhttplogdrainoptions",[324,671,672],{},"createHttpLogDrain(options)",[315,674,675,676,679,680,683,684,564],{},"High-level, pre-composed: creates a pipeline with batching, retry, and auto-flush on ",[324,677,678],{},"visibilitychange",". Returns a ",[324,681,682],{},"PipelineDrainFn\u003CDrainContext>"," directly usable with ",[324,685,686],{},"initLogger({ drain })",[402,688,690],{"className":404,"code":689,"filename":406,"language":407,"meta":408,"style":408},"import { initLogger, log } from 'evlog'\nimport { createHttpLogDrain } from 'evlog\u002Fhttp'\n\nconst drain = createHttpLogDrain({\n  drain: { endpoint: 'https:\u002F\u002Flogs.example.com\u002Fv1\u002Fingest' },\n  pipeline: { batch: { size: 50, intervalMs: 5000 } },\n})\n\ninitLogger({ drain })\nlog.info({ action: 'click', target: 'buy-button' })\n",[324,691,692,714,732,736,750,770,809,815,819,833],{"__ignoreMap":408},[382,693,694,696,698,700,702,704,706,708,710,712],{"class":413,"line":414},[382,695,418],{"class":417},[382,697,422],{"class":421},[382,699,426],{"class":425},[382,701,429],{"class":421},[382,703,432],{"class":425},[382,705,435],{"class":421},[382,707,438],{"class":417},[382,709,441],{"class":421},[382,711,445],{"class":444},[382,713,448],{"class":421},[382,715,716,718,720,722,724,726,728,730],{"class":413,"line":451},[382,717,418],{"class":417},[382,719,422],{"class":421},[382,721,458],{"class":425},[382,723,435],{"class":421},[382,725,438],{"class":417},[382,727,441],{"class":421},[382,729,335],{"class":444},[382,731,448],{"class":421},[382,733,734],{"class":413,"line":471},[382,735,475],{"emptyLinePlaceholder":474},[382,737,738,740,742,744,746,748],{"class":413,"line":478},[382,739,482],{"class":481},[382,741,485],{"class":425},[382,743,488],{"class":421},[382,745,458],{"class":491},[382,747,494],{"class":425},[382,749,497],{"class":421},[382,751,752,754,756,758,760,762,764,766,768],{"class":413,"line":500},[382,753,504],{"class":503},[382,755,507],{"class":421},[382,757,422],{"class":421},[382,759,512],{"class":503},[382,761,507],{"class":421},[382,763,441],{"class":421},[382,765,368],{"class":444},[382,767,521],{"class":421},[382,769,524],{"class":421},[382,771,772,775,777,779,782,784,786,789,791,795,797,800,802,805,807],{"class":413,"line":527},[382,773,774],{"class":503},"  pipeline",[382,776,507],{"class":421},[382,778,422],{"class":421},[382,780,781],{"class":503}," batch",[382,783,507],{"class":421},[382,785,422],{"class":421},[382,787,788],{"class":503}," size",[382,790,507],{"class":421},[382,792,794],{"class":793},"sbssI"," 50",[382,796,429],{"class":421},[382,798,799],{"class":503}," intervalMs",[382,801,507],{"class":421},[382,803,804],{"class":793}," 5000",[382,806,435],{"class":421},[382,808,524],{"class":421},[382,810,811,813],{"class":413,"line":536},[382,812,530],{"class":421},[382,814,533],{"class":425},[382,816,817],{"class":413,"line":553},[382,818,475],{"emptyLinePlaceholder":474},[382,820,821,823,825,827,829,831],{"class":413,"line":558},[382,822,539],{"class":491},[382,824,494],{"class":425},[382,826,544],{"class":421},[382,828,485],{"class":425},[382,830,530],{"class":421},[382,832,533],{"class":425},[382,834,836,838,840,842,844,846,848,850,852,855,857,859,862,864,866,869,871,873],{"class":413,"line":835},10,[382,837,561],{"class":425},[382,839,564],{"class":421},[382,841,567],{"class":491},[382,843,494],{"class":425},[382,845,544],{"class":421},[382,847,574],{"class":503},[382,849,507],{"class":421},[382,851,441],{"class":421},[382,853,854],{"class":444},"click",[382,856,521],{"class":421},[382,858,429],{"class":421},[382,860,861],{"class":503}," target",[382,863,507],{"class":421},[382,865,441],{"class":421},[382,867,868],{"class":444},"buy-button",[382,870,521],{"class":421},[382,872,435],{"class":421},[382,874,533],{"class":425},[667,876,878],{"id":877},"createhttpdrainconfig",[324,879,880],{},"createHttpDrain(config)",[315,882,883],{},"Low-level transport function. Use this when you want full control over the pipeline configuration:",[402,885,887],{"className":404,"code":886,"filename":406,"language":407,"meta":408,"style":408},"import { createHttpDrain } from 'evlog\u002Fhttp'\nimport { createDrainPipeline } from 'evlog\u002Fpipeline'\nimport type { DrainContext } from 'evlog'\n\nconst transport = createHttpDrain({\n  endpoint: 'https:\u002F\u002Flogs.example.com\u002Fv1\u002Fingest',\n})\nconst pipeline = createDrainPipeline\u003CDrainContext>({\n  batch: { size: 100, intervalMs: 10000 },\n  retry: { maxAttempts: 5 },\n})\n\nconst drain = pipeline(transport)\n",[324,888,889,908,928,950,954,969,985,991,1016,1043,1062,1069,1074],{"__ignoreMap":408},[382,890,891,893,895,898,900,902,904,906],{"class":413,"line":414},[382,892,418],{"class":417},[382,894,422],{"class":421},[382,896,897],{"class":425}," createHttpDrain",[382,899,435],{"class":421},[382,901,438],{"class":417},[382,903,441],{"class":421},[382,905,335],{"class":444},[382,907,448],{"class":421},[382,909,910,912,914,917,919,921,923,926],{"class":413,"line":451},[382,911,418],{"class":417},[382,913,422],{"class":421},[382,915,916],{"class":425}," createDrainPipeline",[382,918,435],{"class":421},[382,920,438],{"class":417},[382,922,441],{"class":421},[382,924,925],{"class":444},"evlog\u002Fpipeline",[382,927,448],{"class":421},[382,929,930,932,935,937,940,942,944,946,948],{"class":413,"line":471},[382,931,418],{"class":417},[382,933,934],{"class":417}," type",[382,936,422],{"class":421},[382,938,939],{"class":425}," DrainContext",[382,941,435],{"class":421},[382,943,438],{"class":417},[382,945,441],{"class":421},[382,947,445],{"class":444},[382,949,448],{"class":421},[382,951,952],{"class":413,"line":478},[382,953,475],{"emptyLinePlaceholder":474},[382,955,956,958,961,963,965,967],{"class":413,"line":500},[382,957,482],{"class":481},[382,959,960],{"class":425}," transport ",[382,962,488],{"class":421},[382,964,897],{"class":491},[382,966,494],{"class":425},[382,968,497],{"class":421},[382,970,971,974,976,978,980,982],{"class":413,"line":527},[382,972,973],{"class":503},"  endpoint",[382,975,507],{"class":421},[382,977,441],{"class":421},[382,979,368],{"class":444},[382,981,521],{"class":421},[382,983,984],{"class":421},",\n",[382,986,987,989],{"class":413,"line":536},[382,988,530],{"class":421},[382,990,533],{"class":425},[382,992,993,995,998,1000,1002,1005,1009,1012,1014],{"class":413,"line":553},[382,994,482],{"class":481},[382,996,997],{"class":425}," pipeline ",[382,999,488],{"class":421},[382,1001,916],{"class":491},[382,1003,1004],{"class":421},"\u003C",[382,1006,1008],{"class":1007},"sBMFI","DrainContext",[382,1010,1011],{"class":421},">",[382,1013,494],{"class":425},[382,1015,497],{"class":421},[382,1017,1018,1021,1023,1025,1027,1029,1032,1034,1036,1038,1041],{"class":413,"line":558},[382,1019,1020],{"class":503},"  batch",[382,1022,507],{"class":421},[382,1024,422],{"class":421},[382,1026,788],{"class":503},[382,1028,507],{"class":421},[382,1030,1031],{"class":793}," 100",[382,1033,429],{"class":421},[382,1035,799],{"class":503},[382,1037,507],{"class":421},[382,1039,1040],{"class":793}," 10000",[382,1042,524],{"class":421},[382,1044,1045,1048,1050,1052,1055,1057,1060],{"class":413,"line":835},[382,1046,1047],{"class":503},"  retry",[382,1049,507],{"class":421},[382,1051,422],{"class":421},[382,1053,1054],{"class":503}," maxAttempts",[382,1056,507],{"class":421},[382,1058,1059],{"class":793}," 5",[382,1061,524],{"class":421},[382,1063,1065,1067],{"class":413,"line":1064},11,[382,1066,530],{"class":421},[382,1068,533],{"class":425},[382,1070,1072],{"class":413,"line":1071},12,[382,1073,475],{"emptyLinePlaceholder":474},[382,1075,1077,1079,1081,1083,1086],{"class":413,"line":1076},13,[382,1078,482],{"class":481},[382,1080,485],{"class":425},[382,1082,488],{"class":421},[382,1084,1085],{"class":491}," pipeline",[382,1087,1088],{"class":425},"(transport)\n",[398,1090,1092],{"id":1091},"configuration-reference","Configuration Reference",[667,1094,1096],{"id":1095},"httpdrainconfig",[324,1097,1098],{},"HttpDrainConfig",[1100,1101,1102,1118],"table",{},[1103,1104,1105],"thead",{},[1106,1107,1108,1112,1115],"tr",{},[1109,1110,1111],"th",{},"Option",[1109,1113,1114],{},"Default",[1109,1116,1117],{},"Description",[1119,1120,1121,1138,1161,1176,1195],"tbody",{},[1106,1122,1123,1129,1132],{},[1124,1125,1126],"td",{},[324,1127,1128],{},"endpoint",[1124,1130,1131],{},"-",[1124,1133,1134,1137],{},[329,1135,1136],{},"(required)"," Full URL of the server ingest endpoint",[1106,1139,1140,1145,1147],{},[1124,1141,1142],{},[324,1143,1144],{},"headers",[1124,1146,1131],{},[1124,1148,1149,1150,1152,1153,1156,1157,1160],{},"Custom headers sent with each ",[324,1151,638],{}," request (e.g. ",[324,1154,1155],{},"Authorization",", ",[324,1158,1159],{},"X-API-Key",")",[1106,1162,1163,1168,1173],{},[1124,1164,1165],{},[324,1166,1167],{},"timeout",[1124,1169,1170],{},[324,1171,1172],{},"5000",[1124,1174,1175],{},"Request timeout in milliseconds",[1106,1177,1178,1183,1188],{},[1124,1179,1180],{},[324,1181,1182],{},"useBeacon",[1124,1184,1185],{},[324,1186,1187],{},"true",[1124,1189,1190,1191,1194],{},"Use ",[324,1192,1193],{},"sendBeacon"," when the page is hidden",[1106,1196,1197,1202,1207],{},[1124,1198,1199],{},[324,1200,1201],{},"credentials",[1124,1203,1204],{},[324,1205,1206],{},"'same-origin'",[1124,1208,1209,1210,1156,1213,1156,1215,1218,1219,1221],{},"Fetch credentials mode (",[324,1211,1212],{},"'omit'",[324,1214,1206],{},[324,1216,1217],{},"'include'","). Set to ",[324,1220,1217],{}," for cross-origin endpoints",[667,1223,1225],{"id":1224},"httplogdrainoptions",[324,1226,1227],{},"HttpLogDrainOptions",[1100,1229,1230,1240],{},[1103,1231,1232],{},[1106,1233,1234,1236,1238],{},[1109,1235,1111],{},[1109,1237,1114],{},[1109,1239,1117],{},[1119,1241,1242,1259,1274],{},[1106,1243,1244,1249,1251],{},[1124,1245,1246],{},[324,1247,1248],{},"drain",[1124,1250,1131],{},[1124,1252,1253,1255,1256,1258],{},[329,1254,1136],{}," ",[324,1257,1098],{}," object",[1106,1260,1261,1266,1271],{},[1124,1262,1263],{},[324,1264,1265],{},"pipeline",[1124,1267,1268],{},[324,1269,1270],{},"{ batch: { size: 25, intervalMs: 2000 }, retry: { maxAttempts: 2 } }",[1124,1272,1273],{},"Pipeline configuration overrides",[1106,1275,1276,1281,1285],{},[1124,1277,1278],{},[324,1279,1280],{},"autoFlush",[1124,1282,1283],{},[324,1284,1187],{},[1124,1286,1287,1288,1290],{},"Auto-register ",[324,1289,678],{}," flush listener",[398,1292,1294],{"id":1293},"sendbeacon-fallback","sendBeacon Fallback",[319,1296,1298,1299,1301,1302,1304,1305,1307],{"color":567,"icon":1297},"i-lucide-radio","When ",[324,1300,1182],{}," is enabled (the default) and the page becomes hidden, the drain automatically switches from ",[324,1303,638],{}," to ",[324,1306,649],{},". This ensures logs are delivered even when the user closes the tab or navigates away, preventing data loss on page exit.",[315,1309,1310,1312],{},[324,1311,1193],{}," has a browser-imposed payload limit (~64 KB). If the payload exceeds this, the drain throws an error. Keep batch sizes reasonable (the default of 25 is well within limits).",[398,1314,1316],{"id":1315},"authentication","Authentication",[315,1318,1319],{},"Pass custom headers to protect your ingest endpoint:",[402,1321,1323],{"className":404,"code":1322,"filename":406,"language":407,"meta":408,"style":408},"const drain = createHttpLogDrain({\n  drain: {\n    endpoint: 'https:\u002F\u002Flogs.example.com\u002Fv1\u002Fingest',\n    headers: {\n      'Authorization': 'Bearer ' + token,\n    },\n  },\n})\n",[324,1324,1325,1339,1348,1363,1372,1398,1403,1408],{"__ignoreMap":408},[382,1326,1327,1329,1331,1333,1335,1337],{"class":413,"line":414},[382,1328,482],{"class":481},[382,1330,485],{"class":425},[382,1332,488],{"class":421},[382,1334,458],{"class":491},[382,1336,494],{"class":425},[382,1338,497],{"class":421},[382,1340,1341,1343,1345],{"class":413,"line":451},[382,1342,504],{"class":503},[382,1344,507],{"class":421},[382,1346,1347],{"class":421}," {\n",[382,1349,1350,1353,1355,1357,1359,1361],{"class":413,"line":471},[382,1351,1352],{"class":503},"    endpoint",[382,1354,507],{"class":421},[382,1356,441],{"class":421},[382,1358,368],{"class":444},[382,1360,521],{"class":421},[382,1362,984],{"class":421},[382,1364,1365,1368,1370],{"class":413,"line":478},[382,1366,1367],{"class":503},"    headers",[382,1369,507],{"class":421},[382,1371,1347],{"class":421},[382,1373,1374,1377,1379,1381,1383,1385,1388,1390,1393,1396],{"class":413,"line":500},[382,1375,1376],{"class":421},"      '",[382,1378,1155],{"class":503},[382,1380,521],{"class":421},[382,1382,507],{"class":421},[382,1384,441],{"class":421},[382,1386,1387],{"class":444},"Bearer ",[382,1389,521],{"class":421},[382,1391,1392],{"class":421}," +",[382,1394,1395],{"class":425}," token",[382,1397,984],{"class":421},[382,1399,1400],{"class":413,"line":527},[382,1401,1402],{"class":421},"    },\n",[382,1404,1405],{"class":413,"line":536},[382,1406,1407],{"class":421},"  },\n",[382,1409,1410,1412],{"class":413,"line":553},[382,1411,530],{"class":421},[382,1413,533],{"class":425},[319,1415,1417,1419,1420,1422,1423,1425,1426,1428,1429,1432,1433,1435,1436,639,1438,564],{"color":1416,"icon":59},"warning",[324,1418,1144],{}," are applied to ",[324,1421,638],{}," requests only. The ",[324,1424,1193],{}," API does not support custom headers, so when the page is hidden and ",[324,1427,1193],{}," is used, headers are not sent. If your endpoint requires authentication, consider validating via a session cookie (set ",[324,1430,1431],{},"credentials: 'include'"," for cross-origin endpoints, defaults to ",[324,1434,1206],{},") or disable ",[324,1437,1193],{},[324,1439,1440],{},"useBeacon: false",[398,1442,1444],{"id":1443},"server-endpoint","Server Endpoint",[315,1446,1447,1448,1450],{},"Your server needs a POST endpoint that accepts a ",[324,1449,660],{}," JSON body. Here are examples for common frameworks:",[667,1452,164],{"id":1453},"express",[402,1455,1458],{"className":404,"code":1456,"filename":1457,"language":407,"meta":408,"style":408},"app.post('\u002Fv1\u002Fingest', express.json(), (req, res) => {\n  for (const entry of req.body) {\n    console.log('[BROWSER]', JSON.stringify(entry))\n  }\n  res.sendStatus(204)\n})\n","server.ts",[324,1459,1460,1513,1541,1577,1582,1599],{"__ignoreMap":408},[382,1461,1462,1465,1467,1470,1472,1474,1477,1479,1481,1484,1486,1489,1492,1494,1497,1501,1503,1506,1508,1511],{"class":413,"line":414},[382,1463,1464],{"class":425},"app",[382,1466,564],{"class":421},[382,1468,1469],{"class":491},"post",[382,1471,494],{"class":425},[382,1473,521],{"class":421},[382,1475,1476],{"class":444},"\u002Fv1\u002Fingest",[382,1478,521],{"class":421},[382,1480,429],{"class":421},[382,1482,1483],{"class":425}," express",[382,1485,564],{"class":421},[382,1487,1488],{"class":491},"json",[382,1490,1491],{"class":425},"()",[382,1493,429],{"class":421},[382,1495,1496],{"class":421}," (",[382,1498,1500],{"class":1499},"sHdIc","req",[382,1502,429],{"class":421},[382,1504,1505],{"class":1499}," res",[382,1507,1160],{"class":421},[382,1509,1510],{"class":481}," =>",[382,1512,1347],{"class":421},[382,1514,1515,1518,1520,1522,1525,1528,1531,1533,1536,1539],{"class":413,"line":451},[382,1516,1517],{"class":417},"  for",[382,1519,1496],{"class":503},[382,1521,482],{"class":481},[382,1523,1524],{"class":425}," entry",[382,1526,1527],{"class":421}," of",[382,1529,1530],{"class":425}," req",[382,1532,564],{"class":421},[382,1534,1535],{"class":425},"body",[382,1537,1538],{"class":503},") ",[382,1540,497],{"class":421},[382,1542,1543,1546,1548,1550,1552,1554,1557,1559,1561,1564,1566,1569,1571,1574],{"class":413,"line":471},[382,1544,1545],{"class":425},"    console",[382,1547,564],{"class":421},[382,1549,561],{"class":491},[382,1551,494],{"class":503},[382,1553,521],{"class":421},[382,1555,1556],{"class":444},"[BROWSER]",[382,1558,521],{"class":421},[382,1560,429],{"class":421},[382,1562,1563],{"class":425}," JSON",[382,1565,564],{"class":421},[382,1567,1568],{"class":491},"stringify",[382,1570,494],{"class":503},[382,1572,1573],{"class":425},"entry",[382,1575,1576],{"class":503},"))\n",[382,1578,1579],{"class":413,"line":478},[382,1580,1581],{"class":421},"  }\n",[382,1583,1584,1587,1589,1592,1594,1597],{"class":413,"line":500},[382,1585,1586],{"class":425},"  res",[382,1588,564],{"class":421},[382,1590,1591],{"class":491},"sendStatus",[382,1593,494],{"class":503},[382,1595,1596],{"class":793},"204",[382,1598,533],{"class":503},[382,1600,1601,1603],{"class":413,"line":527},[382,1602,530],{"class":421},[382,1604,533],{"class":425},[667,1606,169],{"id":1607},"hono",[402,1609,1611],{"className":404,"code":1610,"filename":1457,"language":407,"meta":408,"style":408},"app.post('\u002Fv1\u002Fingest', async (c) => {\n  const body = await c.req.json()\n  for (const entry of body) {\n    console.log('[BROWSER]', JSON.stringify(entry))\n  }\n  return c.body(null, 204)\n})\n",[324,1612,1613,1645,1673,1691,1721,1725,1746],{"__ignoreMap":408},[382,1614,1615,1617,1619,1621,1623,1625,1627,1629,1631,1634,1636,1639,1641,1643],{"class":413,"line":414},[382,1616,1464],{"class":425},[382,1618,564],{"class":421},[382,1620,1469],{"class":491},[382,1622,494],{"class":425},[382,1624,521],{"class":421},[382,1626,1476],{"class":444},[382,1628,521],{"class":421},[382,1630,429],{"class":421},[382,1632,1633],{"class":481}," async",[382,1635,1496],{"class":421},[382,1637,1638],{"class":1499},"c",[382,1640,1160],{"class":421},[382,1642,1510],{"class":481},[382,1644,1347],{"class":421},[382,1646,1647,1650,1653,1656,1659,1662,1664,1666,1668,1670],{"class":413,"line":451},[382,1648,1649],{"class":481},"  const",[382,1651,1652],{"class":425}," body",[382,1654,1655],{"class":421}," =",[382,1657,1658],{"class":417}," await",[382,1660,1661],{"class":425}," c",[382,1663,564],{"class":421},[382,1665,1500],{"class":425},[382,1667,564],{"class":421},[382,1669,1488],{"class":491},[382,1671,1672],{"class":503},"()\n",[382,1674,1675,1677,1679,1681,1683,1685,1687,1689],{"class":413,"line":471},[382,1676,1517],{"class":417},[382,1678,1496],{"class":503},[382,1680,482],{"class":481},[382,1682,1524],{"class":425},[382,1684,1527],{"class":421},[382,1686,1652],{"class":425},[382,1688,1538],{"class":503},[382,1690,497],{"class":421},[382,1692,1693,1695,1697,1699,1701,1703,1705,1707,1709,1711,1713,1715,1717,1719],{"class":413,"line":478},[382,1694,1545],{"class":425},[382,1696,564],{"class":421},[382,1698,561],{"class":491},[382,1700,494],{"class":503},[382,1702,521],{"class":421},[382,1704,1556],{"class":444},[382,1706,521],{"class":421},[382,1708,429],{"class":421},[382,1710,1563],{"class":425},[382,1712,564],{"class":421},[382,1714,1568],{"class":491},[382,1716,494],{"class":503},[382,1718,1573],{"class":425},[382,1720,1576],{"class":503},[382,1722,1723],{"class":413,"line":500},[382,1724,1581],{"class":421},[382,1726,1727,1730,1732,1734,1736,1738,1741,1744],{"class":413,"line":527},[382,1728,1729],{"class":417},"  return",[382,1731,1661],{"class":425},[382,1733,564],{"class":421},[382,1735,1535],{"class":491},[382,1737,494],{"class":503},[382,1739,1740],{"class":421},"null,",[382,1742,1743],{"class":793}," 204",[382,1745,533],{"class":503},[382,1747,1748,1750],{"class":413,"line":536},[382,1749,530],{"class":421},[382,1751,533],{"class":425},[398,1753,1755],{"id":1754},"full-control","Full Control",[315,1757,1758,1759,639,1762,1765],{},"Combine ",[324,1760,1761],{},"createHttpDrain",[324,1763,1764],{},"createDrainPipeline"," for maximum flexibility:",[402,1767,1769],{"className":404,"code":1768,"filename":406,"language":407,"meta":408,"style":408},"import { initLogger, log } from 'evlog'\nimport type { DrainContext } from 'evlog'\nimport { createHttpDrain } from 'evlog\u002Fhttp'\nimport { createDrainPipeline } from 'evlog\u002Fpipeline'\n\nconst pipeline = createDrainPipeline\u003CDrainContext>({\n  batch: { size: 100, intervalMs: 10000 },\n  retry: { maxAttempts: 5, backoff: 'exponential' },\n  maxBufferSize: 500,\n  onDropped: (events) => {\n    console.warn(`Dropped ${events.length} client events`)\n  },\n})\n\nconst drain = pipeline(createHttpDrain({\n  endpoint: 'https:\u002F\u002Flogs.example.com\u002Fv1\u002Fingest',\n  timeout: 3000,\n}))\n\ninitLogger({ drain })\n\nlog.info({ action: 'app_init' })\n\n\u002F\u002F Flush on page unload\nwindow.addEventListener('beforeunload', () => drain.flush())\n",[324,1770,1771,1793,1813,1831,1849,1853,1873,1897,1927,1939,1957,1993,1997,2003,2008,2027,2042,2055,2062,2067,2082,2087,2115,2120,2127],{"__ignoreMap":408},[382,1772,1773,1775,1777,1779,1781,1783,1785,1787,1789,1791],{"class":413,"line":414},[382,1774,418],{"class":417},[382,1776,422],{"class":421},[382,1778,426],{"class":425},[382,1780,429],{"class":421},[382,1782,432],{"class":425},[382,1784,435],{"class":421},[382,1786,438],{"class":417},[382,1788,441],{"class":421},[382,1790,445],{"class":444},[382,1792,448],{"class":421},[382,1794,1795,1797,1799,1801,1803,1805,1807,1809,1811],{"class":413,"line":451},[382,1796,418],{"class":417},[382,1798,934],{"class":417},[382,1800,422],{"class":421},[382,1802,939],{"class":425},[382,1804,435],{"class":421},[382,1806,438],{"class":417},[382,1808,441],{"class":421},[382,1810,445],{"class":444},[382,1812,448],{"class":421},[382,1814,1815,1817,1819,1821,1823,1825,1827,1829],{"class":413,"line":471},[382,1816,418],{"class":417},[382,1818,422],{"class":421},[382,1820,897],{"class":425},[382,1822,435],{"class":421},[382,1824,438],{"class":417},[382,1826,441],{"class":421},[382,1828,335],{"class":444},[382,1830,448],{"class":421},[382,1832,1833,1835,1837,1839,1841,1843,1845,1847],{"class":413,"line":478},[382,1834,418],{"class":417},[382,1836,422],{"class":421},[382,1838,916],{"class":425},[382,1840,435],{"class":421},[382,1842,438],{"class":417},[382,1844,441],{"class":421},[382,1846,925],{"class":444},[382,1848,448],{"class":421},[382,1850,1851],{"class":413,"line":500},[382,1852,475],{"emptyLinePlaceholder":474},[382,1854,1855,1857,1859,1861,1863,1865,1867,1869,1871],{"class":413,"line":527},[382,1856,482],{"class":481},[382,1858,997],{"class":425},[382,1860,488],{"class":421},[382,1862,916],{"class":491},[382,1864,1004],{"class":421},[382,1866,1008],{"class":1007},[382,1868,1011],{"class":421},[382,1870,494],{"class":425},[382,1872,497],{"class":421},[382,1874,1875,1877,1879,1881,1883,1885,1887,1889,1891,1893,1895],{"class":413,"line":536},[382,1876,1020],{"class":503},[382,1878,507],{"class":421},[382,1880,422],{"class":421},[382,1882,788],{"class":503},[382,1884,507],{"class":421},[382,1886,1031],{"class":793},[382,1888,429],{"class":421},[382,1890,799],{"class":503},[382,1892,507],{"class":421},[382,1894,1040],{"class":793},[382,1896,524],{"class":421},[382,1898,1899,1901,1903,1905,1907,1909,1911,1913,1916,1918,1920,1923,1925],{"class":413,"line":553},[382,1900,1047],{"class":503},[382,1902,507],{"class":421},[382,1904,422],{"class":421},[382,1906,1054],{"class":503},[382,1908,507],{"class":421},[382,1910,1059],{"class":793},[382,1912,429],{"class":421},[382,1914,1915],{"class":503}," backoff",[382,1917,507],{"class":421},[382,1919,441],{"class":421},[382,1921,1922],{"class":444},"exponential",[382,1924,521],{"class":421},[382,1926,524],{"class":421},[382,1928,1929,1932,1934,1937],{"class":413,"line":558},[382,1930,1931],{"class":503},"  maxBufferSize",[382,1933,507],{"class":421},[382,1935,1936],{"class":793}," 500",[382,1938,984],{"class":421},[382,1940,1941,1944,1946,1948,1951,1953,1955],{"class":413,"line":835},[382,1942,1943],{"class":491},"  onDropped",[382,1945,507],{"class":421},[382,1947,1496],{"class":421},[382,1949,1950],{"class":1499},"events",[382,1952,1160],{"class":421},[382,1954,1510],{"class":481},[382,1956,1347],{"class":421},[382,1958,1959,1961,1963,1966,1968,1971,1974,1977,1979,1981,1984,1986,1989,1991],{"class":413,"line":1064},[382,1960,1545],{"class":425},[382,1962,564],{"class":421},[382,1964,1965],{"class":491},"warn",[382,1967,494],{"class":503},[382,1969,1970],{"class":421},"`",[382,1972,1973],{"class":444},"Dropped ",[382,1975,1976],{"class":421},"${",[382,1978,1950],{"class":425},[382,1980,564],{"class":421},[382,1982,1983],{"class":425},"length",[382,1985,530],{"class":421},[382,1987,1988],{"class":444}," client events",[382,1990,1970],{"class":421},[382,1992,533],{"class":503},[382,1994,1995],{"class":413,"line":1071},[382,1996,1407],{"class":421},[382,1998,1999,2001],{"class":413,"line":1076},[382,2000,530],{"class":421},[382,2002,533],{"class":425},[382,2004,2006],{"class":413,"line":2005},14,[382,2007,475],{"emptyLinePlaceholder":474},[382,2009,2011,2013,2015,2017,2019,2021,2023,2025],{"class":413,"line":2010},15,[382,2012,482],{"class":481},[382,2014,485],{"class":425},[382,2016,488],{"class":421},[382,2018,1085],{"class":491},[382,2020,494],{"class":425},[382,2022,1761],{"class":491},[382,2024,494],{"class":425},[382,2026,497],{"class":421},[382,2028,2030,2032,2034,2036,2038,2040],{"class":413,"line":2029},16,[382,2031,973],{"class":503},[382,2033,507],{"class":421},[382,2035,441],{"class":421},[382,2037,368],{"class":444},[382,2039,521],{"class":421},[382,2041,984],{"class":421},[382,2043,2045,2048,2050,2053],{"class":413,"line":2044},17,[382,2046,2047],{"class":503},"  timeout",[382,2049,507],{"class":421},[382,2051,2052],{"class":793}," 3000",[382,2054,984],{"class":421},[382,2056,2058,2060],{"class":413,"line":2057},18,[382,2059,530],{"class":421},[382,2061,1576],{"class":425},[382,2063,2065],{"class":413,"line":2064},19,[382,2066,475],{"emptyLinePlaceholder":474},[382,2068,2070,2072,2074,2076,2078,2080],{"class":413,"line":2069},20,[382,2071,539],{"class":491},[382,2073,494],{"class":425},[382,2075,544],{"class":421},[382,2077,485],{"class":425},[382,2079,530],{"class":421},[382,2081,533],{"class":425},[382,2083,2085],{"class":413,"line":2084},21,[382,2086,475],{"emptyLinePlaceholder":474},[382,2088,2090,2092,2094,2096,2098,2100,2102,2104,2106,2109,2111,2113],{"class":413,"line":2089},22,[382,2091,561],{"class":425},[382,2093,564],{"class":421},[382,2095,567],{"class":491},[382,2097,494],{"class":425},[382,2099,544],{"class":421},[382,2101,574],{"class":503},[382,2103,507],{"class":421},[382,2105,441],{"class":421},[382,2107,2108],{"class":444},"app_init",[382,2110,521],{"class":421},[382,2112,435],{"class":421},[382,2114,533],{"class":425},[382,2116,2118],{"class":413,"line":2117},23,[382,2119,475],{"emptyLinePlaceholder":474},[382,2121,2123],{"class":413,"line":2122},24,[382,2124,2126],{"class":2125},"sHwdD","\u002F\u002F Flush on page unload\n",[382,2128,2130,2133,2135,2138,2140,2142,2145,2147,2149,2152,2154,2157,2159,2162],{"class":413,"line":2129},25,[382,2131,2132],{"class":425},"window",[382,2134,564],{"class":421},[382,2136,2137],{"class":491},"addEventListener",[382,2139,494],{"class":425},[382,2141,521],{"class":421},[382,2143,2144],{"class":444},"beforeunload",[382,2146,521],{"class":421},[382,2148,429],{"class":421},[382,2150,2151],{"class":421}," ()",[382,2153,1510],{"class":481},[382,2155,2156],{"class":425}," drain",[382,2158,564],{"class":421},[382,2160,2161],{"class":491},"flush",[382,2163,2164],{"class":425},"())\n",[319,2166,2168,2169,2174],{"color":321,"icon":2167},"i-lucide-arrow-right","See the full ",[366,2170,2173],{"href":2171,"rel":2172},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Ftree\u002Fmain\u002Fexamples\u002Fbrowser",[370],"browser example"," for a working Hono server + browser page that demonstrates the complete flow end to end.",[319,2176,2177,2178,2181],{"color":321,"icon":291},"See the ",[366,2179,2180],{"href":140},"Next.js guide"," for a working implementation.",[398,2183,2185],{"id":2184},"next-steps","Next Steps",[353,2187,2188,2195,2200],{},[356,2189,2190,2194],{},[366,2191,2193],{"href":2192},"\u002Fadapters\u002Foverview","Adapters Overview"," - Available built-in adapters",[356,2196,2197,2199],{},[366,2198,278],{"href":279}," - Batching, retry, and buffer overflow handling",[356,2201,2202,2204],{},[366,2203,288],{"href":289}," - Build your own drain function",[2206,2207,2208],"style",{},"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 .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .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 .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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 .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":408,"searchDepth":451,"depth":451,"links":2210},[2211,2212,2213,2217,2221,2222,2223,2227,2228],{"id":400,"depth":451,"text":20},{"id":605,"depth":451,"text":606},{"id":664,"depth":451,"text":665,"children":2214},[2215,2216],{"id":669,"depth":471,"text":672},{"id":877,"depth":471,"text":880},{"id":1091,"depth":451,"text":1092,"children":2218},[2219,2220],{"id":1095,"depth":471,"text":1098},{"id":1224,"depth":471,"text":1227},{"id":1293,"depth":451,"text":1294},{"id":1315,"depth":451,"text":1316},{"id":1443,"depth":451,"text":1444,"children":2224},[2225,2226],{"id":1453,"depth":471,"text":164},{"id":1607,"depth":471,"text":169},{"id":1754,"depth":451,"text":1755},{"id":2184,"depth":451,"text":2185},"Framework-agnostic HTTP log transport for sending client-side logs to your server via fetch or sendBeacon. Works in the browser or any environment with fetch. Use the `evlog\u002Fhttp` entry point.","md",[2232,2235],{"label":2193,"icon":2233,"to":2192,"color":321,"variant":2234},"i-custom-plug","subtle",{"label":278,"icon":281,"to":279,"color":321,"variant":2234},{},{"title":283,"icon":286},{"title":310,"description":2229},"2DU1KAmq-ibPl2rFfDf3SpVjzShnZp2X2OUXYAoxWlo",[2241,2243],{"title":278,"path":279,"stem":280,"description":2242,"icon":281,"children":-1},"Batch events, retry on failure, and protect against buffer overflow with the shared drain pipeline. Supports fan-out to multiple adapters.",{"title":288,"path":289,"stem":290,"description":2244,"icon":291,"children":-1},"Build your own adapter to send logs to any destination. Factory patterns, batching, filtering, and error handling best practices.",1777667169653]