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