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