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