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