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