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