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