[{"data":1,"prerenderedAt":1605},["ShallowReactive",2],{"navigation_docs":3,"-core-concepts-vite-plugin":263,"-core-concepts-vite-plugin-surround":1600},[4,30,115,174,233,249],{"title":5,"path":6,"stem":7,"children":8,"page":29},"Getting Started","\u002Fgetting-started","1.getting-started",[9,14,19,24],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-info",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quick Start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start","i-lucide-zap",{"title":25,"path":26,"stem":27,"icon":28},"Agent Skills","\u002Fgetting-started\u002Fagent-skills","1.getting-started\u002F4.agent-skills","i-lucide-sparkles",false,{"title":31,"path":32,"stem":33,"children":34,"page":29},"Frameworks","\u002Fframeworks","2.frameworks",[35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110],{"title":36,"path":37,"stem":38,"icon":39},"Overview","\u002Fframeworks\u002Foverview","2.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":41,"path":42,"stem":43,"icon":44},"Nuxt","\u002Fframeworks\u002Fnuxt","2.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":46,"path":47,"stem":48,"icon":49},"Next.js","\u002Fframeworks\u002Fnextjs","2.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":51,"path":52,"stem":53,"icon":54},"SvelteKit","\u002Fframeworks\u002Fsveltekit","2.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":56,"path":57,"stem":58,"icon":59},"Nitro","\u002Fframeworks\u002Fnitro","2.frameworks\u002F04.nitro","i-custom-nitro",{"title":61,"path":62,"stem":63,"icon":64},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","2.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":66,"path":67,"stem":68,"icon":69},"NestJS","\u002Fframeworks\u002Fnestjs","2.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":71,"path":72,"stem":73,"icon":74},"Express","\u002Fframeworks\u002Fexpress","2.frameworks\u002F07.express","i-simple-icons-express",{"title":76,"path":77,"stem":78,"icon":79},"Hono","\u002Fframeworks\u002Fhono","2.frameworks\u002F08.hono","i-simple-icons-hono",{"title":81,"path":82,"stem":83,"icon":84},"Fastify","\u002Fframeworks\u002Ffastify","2.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":86,"path":87,"stem":88,"icon":89},"Elysia","\u002Fframeworks\u002Felysia","2.frameworks\u002F10.elysia","i-custom-elysia",{"title":91,"path":92,"stem":93,"icon":94},"React Router","\u002Fframeworks\u002Freact-router","2.frameworks\u002F11.react-router","i-simple-icons-reactrouter",{"title":96,"path":97,"stem":98,"icon":99},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","2.frameworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":101,"path":102,"stem":103,"icon":104},"Standalone","\u002Fframeworks\u002Fstandalone","2.frameworks\u002F13.standalone","i-simple-icons-typescript",{"title":106,"path":107,"stem":108,"icon":109},"Astro","\u002Fframeworks\u002Fastro","2.frameworks\u002F14.astro","i-simple-icons-astro",{"title":111,"path":112,"stem":113,"icon":114},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","2.frameworks\u002F15.custom-integration","i-lucide-puzzle",{"title":116,"path":117,"stem":118,"children":119,"page":29},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[120,125,130,135,140,145,150,154,159,164,169],{"title":121,"path":122,"stem":123,"icon":124},"Request Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":126,"path":127,"stem":128,"icon":129},"Wide Events","\u002Fcore-concepts\u002Fwide-events","3.core-concepts\u002F1.wide-events","i-lucide-layers",{"title":131,"path":132,"stem":133,"icon":134},"Vite Plugin","\u002Fcore-concepts\u002Fvite-plugin","3.core-concepts\u002F10.vite-plugin","i-custom-vite",{"title":136,"path":137,"stem":138,"icon":139},"AI SDK Integration","\u002Fcore-concepts\u002Fai-sdk","3.core-concepts\u002F11.ai-sdk","i-simple-icons-vercel",{"title":141,"path":142,"stem":143,"icon":144},"Structured Errors","\u002Fcore-concepts\u002Fstructured-errors","3.core-concepts\u002F2.structured-errors","i-lucide-shield-alert",{"title":146,"path":147,"stem":148,"icon":149},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F3.best-practices","i-lucide-shield-check",{"title":151,"path":152,"stem":153,"icon":104},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F4.typed-fields",{"title":155,"path":156,"stem":157,"icon":158},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F5.sampling","i-lucide-filter",{"title":160,"path":161,"stem":162,"icon":163},"Client Logging","\u002Fcore-concepts\u002Fclient-logging","3.core-concepts\u002F6.client-logging","i-lucide-monitor",{"title":165,"path":166,"stem":167,"icon":168},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F7.configuration","i-lucide-settings",{"title":170,"path":171,"stem":172,"icon":173},"Performance","\u002Fcore-concepts\u002Fperformance","3.core-concepts\u002F8.performance","i-lucide-gauge",{"title":175,"path":176,"stem":177,"children":178,"page":29},"Adapters","\u002Fadapters","4.adapters",[179,183,188,193,198,203,208,213,218,223,228],{"title":36,"path":180,"stem":181,"icon":182},"\u002Fadapters\u002Foverview","4.adapters\u002F1.overview","i-custom-plug",{"title":184,"path":185,"stem":186,"icon":187},"Pipeline","\u002Fadapters\u002Fpipeline","4.adapters\u002F10.pipeline","i-lucide-workflow",{"title":189,"path":190,"stem":191,"icon":192},"Browser","\u002Fadapters\u002Fbrowser","4.adapters\u002F11.browser","i-lucide-globe",{"title":194,"path":195,"stem":196,"icon":197},"Axiom","\u002Fadapters\u002Faxiom","4.adapters\u002F2.axiom","i-custom-axiom",{"title":199,"path":200,"stem":201,"icon":202},"OTLP","\u002Fadapters\u002Fotlp","4.adapters\u002F3.otlp","i-simple-icons-opentelemetry",{"title":204,"path":205,"stem":206,"icon":207},"PostHog","\u002Fadapters\u002Fposthog","4.adapters\u002F4.posthog","i-simple-icons-posthog",{"title":209,"path":210,"stem":211,"icon":212},"Sentry","\u002Fadapters\u002Fsentry","4.adapters\u002F5.sentry","i-simple-icons-sentry",{"title":214,"path":215,"stem":216,"icon":217},"Better Stack","\u002Fadapters\u002Fbetter-stack","4.adapters\u002F6.better-stack","i-simple-icons-betterstack",{"title":219,"path":220,"stem":221,"icon":222},"File System","\u002Fadapters\u002Ffs","4.adapters\u002F7.fs","i-lucide-hard-drive",{"title":224,"path":225,"stem":226,"icon":227},"HyperDX","\u002Fadapters\u002Fhyperdx","4.adapters\u002F8.hyperdx","i-custom-hyperdx",{"title":229,"path":230,"stem":231,"icon":232},"Custom Adapters","\u002Fadapters\u002Fcustom","4.adapters\u002F9.custom","i-lucide-code",{"title":234,"path":235,"stem":236,"children":237,"page":29},"Enrichers","\u002Fenrichers","5.enrichers",[238,241,245],{"title":36,"path":239,"stem":240,"icon":28},"\u002Fenrichers\u002Foverview","5.enrichers\u002F1.overview",{"title":242,"path":243,"stem":244,"icon":114},"Built-in","\u002Fenrichers\u002Fbuilt-in","5.enrichers\u002F2.built-in",{"title":246,"path":247,"stem":248,"icon":232},"Custom","\u002Fenrichers\u002Fcustom","5.enrichers\u002F3.custom",{"title":250,"path":251,"stem":252,"children":253,"page":29},"NuxtHub","\u002Fnuxthub","6.nuxthub",[254,258],{"title":36,"path":255,"stem":256,"icon":257},"\u002Fnuxthub\u002Foverview","6.nuxthub\u002F1.overview","i-lucide-database",{"title":259,"path":260,"stem":261,"icon":262},"Retention","\u002Fnuxthub\u002Fretention","6.nuxthub\u002F2.retention","i-lucide-clock",{"id":264,"title":131,"body":265,"description":1587,"extension":1588,"links":1589,"meta":1596,"navigation":1597,"path":132,"seo":1598,"stem":133,"__hash__":1599},"docs\u002F3.core-concepts\u002F10.vite-plugin.md",{"type":266,"value":267,"toc":1570},"minimark",[268,277,298,302,307,332,339,504,507,525,529,533,555,682,703,707,713,785,796,800,807,864,867,912,915,968,972,984,1028,1031,1050,1071,1075,1093,1194,1197,1406,1410,1421,1544,1548,1566],[269,270,271,272,276],"p",{},"The ",[273,274,275],"code",{},"evlog\u002Fvite"," plugin adds build-time DX features to any Vite-based project. It works with SvelteKit, Hono, Express, Fastify, Elysia, and any framework using Vite as its build tool.",[278,279,281,285,286,289,290,293,294,297],"callout",{"color":280,"icon":13},"info",[282,283,284],"strong",{},"Nuxt users",": These features are already integrated into the ",[273,287,288],{},"evlog\u002Fnuxt"," module via ",[273,291,292],{},"strip"," and ",[273,295,296],{},"sourceLocation"," options. You don't need to install the Vite plugin separately.",[299,300,20],"h2",{"id":301},"quick-start",[303,304,306],"h3",{"id":305},"_1-install","1. Install",[308,309,314],"pre",{"className":310,"code":311,"language":312,"meta":313,"style":313},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","bun add evlog\n","bash","",[273,315,316],{"__ignoreMap":313},[317,318,321,325,329],"span",{"class":319,"line":320},"line",1,[317,322,324],{"class":323},"sBMFI","bun",[317,326,328],{"class":327},"sfazB"," add",[317,330,331],{"class":327}," evlog\n",[303,333,335,336],{"id":334},"_2-add-to-viteconfigts","2. Add to ",[273,337,338],{},"vite.config.ts",[308,340,344],{"className":341,"code":342,"filename":338,"language":343,"meta":313,"style":313},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { defineConfig } from 'vite'\nimport evlog from 'evlog\u002Fvite'\n\nexport default defineConfig({\n  plugins: [\n    evlog({\n      service: 'my-api',\n      environment: 'production',\n    }),\n  ],\n})\n","typescript",[273,345,346,375,392,399,417,430,440,459,476,487,495],{"__ignoreMap":313},[317,347,348,352,356,360,363,366,369,372],{"class":319,"line":320},[317,349,351],{"class":350},"s7zQu","import",[317,353,355],{"class":354},"sMK4o"," {",[317,357,359],{"class":358},"sTEyZ"," defineConfig",[317,361,362],{"class":354}," }",[317,364,365],{"class":350}," from",[317,367,368],{"class":354}," '",[317,370,371],{"class":327},"vite",[317,373,374],{"class":354},"'\n",[317,376,378,380,383,386,388,390],{"class":319,"line":377},2,[317,379,351],{"class":350},[317,381,382],{"class":358}," evlog ",[317,384,385],{"class":350},"from",[317,387,368],{"class":354},[317,389,275],{"class":327},[317,391,374],{"class":354},[317,393,395],{"class":319,"line":394},3,[317,396,398],{"emptyLinePlaceholder":397},true,"\n",[317,400,402,405,408,411,414],{"class":319,"line":401},4,[317,403,404],{"class":350},"export",[317,406,407],{"class":350}," default",[317,409,359],{"class":410},"s2Zo4",[317,412,413],{"class":358},"(",[317,415,416],{"class":354},"{\n",[317,418,420,424,427],{"class":319,"line":419},5,[317,421,423],{"class":422},"swJcz","  plugins",[317,425,426],{"class":354},":",[317,428,429],{"class":358}," [\n",[317,431,433,436,438],{"class":319,"line":432},6,[317,434,435],{"class":410},"    evlog",[317,437,413],{"class":358},[317,439,416],{"class":354},[317,441,443,446,448,450,453,456],{"class":319,"line":442},7,[317,444,445],{"class":422},"      service",[317,447,426],{"class":354},[317,449,368],{"class":354},[317,451,452],{"class":327},"my-api",[317,454,455],{"class":354},"'",[317,457,458],{"class":354},",\n",[317,460,462,465,467,469,472,474],{"class":319,"line":461},8,[317,463,464],{"class":422},"      environment",[317,466,426],{"class":354},[317,468,368],{"class":354},[317,470,471],{"class":327},"production",[317,473,455],{"class":354},[317,475,458],{"class":354},[317,477,479,482,485],{"class":319,"line":478},9,[317,480,481],{"class":354},"    }",[317,483,484],{"class":358},")",[317,486,458],{"class":354},[317,488,490,493],{"class":319,"line":489},10,[317,491,492],{"class":358},"  ]",[317,494,458],{"class":354},[317,496,498,501],{"class":319,"line":497},11,[317,499,500],{"class":354},"}",[317,502,503],{"class":358},")\n",[269,505,506],{},"That's it. The plugin automatically:",[508,509,510,518],"ul",{},[511,512,513,514,517],"li",{},"Initializes the logger at compile time (no ",[273,515,516],{},"initLogger()"," call needed)",[511,519,520,521,524],{},"Strips ",[273,522,523],{},"log.debug()"," calls from production builds",[299,526,528],{"id":527},"features","Features",[303,530,532],{"id":531},"auto-initialization","Auto-initialization",[269,534,535,536,539,540,543,544,547,548,551,552,554],{},"The plugin injects logger configuration at compile time via Vite's ",[273,537,538],{},"define"," hook. Your code can use ",[273,541,542],{},"log",", ",[273,545,546],{},"createLogger()",", and ",[273,549,550],{},"createRequestLogger()"," immediately — no ",[273,553,516],{}," call required.",[308,556,558],{"className":341,"code":557,"language":343,"meta":313,"style":313},"\u002F\u002F Before (manual setup)\nimport { initLogger, createLogger } from 'evlog'\ninitLogger({ env: { service: 'my-api' } })\nconst log = createLogger()\n\n\u002F\u002F After (with Vite plugin)\nimport { createLogger } from 'evlog'\nconst log = createLogger()\n",[273,559,560,566,592,626,643,647,652,670],{"__ignoreMap":313},[317,561,562],{"class":319,"line":320},[317,563,565],{"class":564},"sHwdD","\u002F\u002F Before (manual setup)\n",[317,567,568,570,572,575,578,581,583,585,587,590],{"class":319,"line":377},[317,569,351],{"class":350},[317,571,355],{"class":354},[317,573,574],{"class":358}," initLogger",[317,576,577],{"class":354},",",[317,579,580],{"class":358}," createLogger",[317,582,362],{"class":354},[317,584,365],{"class":350},[317,586,368],{"class":354},[317,588,589],{"class":327},"evlog",[317,591,374],{"class":354},[317,593,594,597,599,602,605,607,609,612,614,616,618,620,622,624],{"class":319,"line":394},[317,595,596],{"class":410},"initLogger",[317,598,413],{"class":358},[317,600,601],{"class":354},"{",[317,603,604],{"class":422}," env",[317,606,426],{"class":354},[317,608,355],{"class":354},[317,610,611],{"class":422}," service",[317,613,426],{"class":354},[317,615,368],{"class":354},[317,617,452],{"class":327},[317,619,455],{"class":354},[317,621,362],{"class":354},[317,623,362],{"class":354},[317,625,503],{"class":358},[317,627,628,632,635,638,640],{"class":319,"line":401},[317,629,631],{"class":630},"spNyl","const",[317,633,634],{"class":358}," log ",[317,636,637],{"class":354},"=",[317,639,580],{"class":410},[317,641,642],{"class":358},"()\n",[317,644,645],{"class":319,"line":419},[317,646,398],{"emptyLinePlaceholder":397},[317,648,649],{"class":319,"line":432},[317,650,651],{"class":564},"\u002F\u002F After (with Vite plugin)\n",[317,653,654,656,658,660,662,664,666,668],{"class":319,"line":442},[317,655,351],{"class":350},[317,657,355],{"class":354},[317,659,580],{"class":358},[317,661,362],{"class":354},[317,663,365],{"class":350},[317,665,368],{"class":354},[317,667,589],{"class":327},[317,669,374],{"class":354},[317,671,672,674,676,678,680],{"class":319,"line":461},[317,673,631],{"class":630},[317,675,634],{"class":358},[317,677,637],{"class":354},[317,679,580],{"class":410},[317,681,642],{"class":358},[269,683,271,684,543,687,543,690,543,693,543,696,547,699,702],{},[273,685,686],{},"service",[273,688,689],{},"environment",[273,691,692],{},"pretty",[273,694,695],{},"silent",[273,697,698],{},"enabled",[273,700,701],{},"sampling"," options are serialized and injected at build time.",[303,704,706],{"id":705},"debug-stripping","Debug stripping",[269,708,709,710,712],{},"By default, all ",[273,711,523],{}," calls are removed from production builds. This is a compile-time transformation — the calls are completely eliminated from the output, not just silenced.",[308,714,716],{"className":341,"code":715,"filename":338,"language":343,"meta":313,"style":313},"evlog({\n  service: 'my-api',\n  \u002F\u002F Default: strip debug logs in production builds\n  \u002F\u002F strip: ['debug'],\n\n  \u002F\u002F Strip debug and info in production:\n  \u002F\u002F strip: ['debug', 'info'],\n\n  \u002F\u002F Disable stripping:\n  \u002F\u002F strip: [],\n})\n",[273,717,718,726,741,746,751,755,760,765,769,774,779],{"__ignoreMap":313},[317,719,720,722,724],{"class":319,"line":320},[317,721,589],{"class":410},[317,723,413],{"class":358},[317,725,416],{"class":354},[317,727,728,731,733,735,737,739],{"class":319,"line":377},[317,729,730],{"class":422},"  service",[317,732,426],{"class":354},[317,734,368],{"class":354},[317,736,452],{"class":327},[317,738,455],{"class":354},[317,740,458],{"class":354},[317,742,743],{"class":319,"line":394},[317,744,745],{"class":564},"  \u002F\u002F Default: strip debug logs in production builds\n",[317,747,748],{"class":319,"line":401},[317,749,750],{"class":564},"  \u002F\u002F strip: ['debug'],\n",[317,752,753],{"class":319,"line":419},[317,754,398],{"emptyLinePlaceholder":397},[317,756,757],{"class":319,"line":432},[317,758,759],{"class":564},"  \u002F\u002F Strip debug and info in production:\n",[317,761,762],{"class":319,"line":442},[317,763,764],{"class":564},"  \u002F\u002F strip: ['debug', 'info'],\n",[317,766,767],{"class":319,"line":461},[317,768,398],{"emptyLinePlaceholder":397},[317,770,771],{"class":319,"line":478},[317,772,773],{"class":564},"  \u002F\u002F Disable stripping:\n",[317,775,776],{"class":319,"line":489},[317,777,778],{"class":564},"  \u002F\u002F strip: [],\n",[317,780,781,783],{"class":319,"line":497},[317,782,500],{"class":354},[317,784,503],{"class":358},[269,786,787,788,791,792,795],{},"Stripping only activates during ",[273,789,790],{},"vite build"," (not ",[273,793,794],{},"vite dev",").",[303,797,799],{"id":798},"source-location-injection","Source location injection",[269,801,802,803,806],{},"When enabled, the plugin injects ",[273,804,805],{},"__source: 'file:line'"," into object-form log calls. This tells you exactly which file and line produced each log entry.",[308,808,810],{"className":341,"code":809,"filename":338,"language":343,"meta":313,"style":313},"evlog({\n  service: 'my-api',\n  sourceLocation: true,      \u002F\u002F Always inject\n  \u002F\u002F sourceLocation: 'dev',  \u002F\u002F Only in development\n})\n",[273,811,812,820,834,850,858],{"__ignoreMap":313},[317,813,814,816,818],{"class":319,"line":320},[317,815,589],{"class":410},[317,817,413],{"class":358},[317,819,416],{"class":354},[317,821,822,824,826,828,830,832],{"class":319,"line":377},[317,823,730],{"class":422},[317,825,426],{"class":354},[317,827,368],{"class":354},[317,829,452],{"class":327},[317,831,455],{"class":354},[317,833,458],{"class":354},[317,835,836,839,841,845,847],{"class":319,"line":394},[317,837,838],{"class":422},"  sourceLocation",[317,840,426],{"class":354},[317,842,844],{"class":843},"sfNiH"," true",[317,846,577],{"class":354},[317,848,849],{"class":564},"      \u002F\u002F Always inject\n",[317,851,852,855],{"class":319,"line":401},[317,853,854],{"class":564},"  \u002F\u002F sourceLocation: 'dev',",[317,856,857],{"class":564},"  \u002F\u002F Only in development\n",[317,859,860,862],{"class":319,"line":419},[317,861,500],{"class":354},[317,863,503],{"class":358},[269,865,866],{},"Before transform:",[308,868,870],{"className":341,"code":869,"language":343,"meta":313,"style":313},"log.info({ action: 'checkout', total: 99 })\n",[273,871,872],{"__ignoreMap":313},[317,873,874,876,879,881,883,885,888,890,892,895,897,899,902,904,908,910],{"class":319,"line":320},[317,875,542],{"class":358},[317,877,878],{"class":354},".",[317,880,280],{"class":410},[317,882,413],{"class":358},[317,884,601],{"class":354},[317,886,887],{"class":422}," action",[317,889,426],{"class":354},[317,891,368],{"class":354},[317,893,894],{"class":327},"checkout",[317,896,455],{"class":354},[317,898,577],{"class":354},[317,900,901],{"class":422}," total",[317,903,426],{"class":354},[317,905,907],{"class":906},"sbssI"," 99",[317,909,362],{"class":354},[317,911,503],{"class":358},[269,913,914],{},"After transform:",[308,916,918],{"className":341,"code":917,"language":343,"meta":313,"style":313},"log.info({ action: 'checkout', total: 99, __source: 'src\u002Fcheckout.ts:42' })\n",[273,919,920],{"__ignoreMap":313},[317,921,922,924,926,928,930,932,934,936,938,940,942,944,946,948,950,952,955,957,959,962,964,966],{"class":319,"line":320},[317,923,542],{"class":358},[317,925,878],{"class":354},[317,927,280],{"class":410},[317,929,413],{"class":358},[317,931,601],{"class":354},[317,933,887],{"class":422},[317,935,426],{"class":354},[317,937,368],{"class":354},[317,939,894],{"class":327},[317,941,455],{"class":354},[317,943,577],{"class":354},[317,945,901],{"class":422},[317,947,426],{"class":354},[317,949,907],{"class":906},[317,951,577],{"class":354},[317,953,954],{"class":422}," __source",[317,956,426],{"class":354},[317,958,368],{"class":354},[317,960,961],{"class":327},"src\u002Fcheckout.ts:42",[317,963,455],{"class":354},[317,965,362],{"class":354},[317,967,503],{"class":358},[303,969,971],{"id":970},"auto-imports-opt-in","Auto-imports (opt-in)",[269,973,974,975,543,977,543,980,983],{},"Automatically detect and import evlog symbols (",[273,976,542],{},[273,978,979],{},"createEvlogError",[273,981,982],{},"parseError",", etc.) without manual import statements. Disabled by default.",[308,985,987],{"className":341,"code":986,"filename":338,"language":343,"meta":313,"style":313},"evlog({\n  service: 'my-api',\n  autoImports: true,\n})\n",[273,988,989,997,1011,1022],{"__ignoreMap":313},[317,990,991,993,995],{"class":319,"line":320},[317,992,589],{"class":410},[317,994,413],{"class":358},[317,996,416],{"class":354},[317,998,999,1001,1003,1005,1007,1009],{"class":319,"line":377},[317,1000,730],{"class":422},[317,1002,426],{"class":354},[317,1004,368],{"class":354},[317,1006,452],{"class":327},[317,1008,455],{"class":354},[317,1010,458],{"class":354},[317,1012,1013,1016,1018,1020],{"class":319,"line":394},[317,1014,1015],{"class":422},"  autoImports",[317,1017,426],{"class":354},[317,1019,844],{"class":843},[317,1021,458],{"class":354},[317,1023,1024,1026],{"class":319,"line":401},[317,1025,500],{"class":354},[317,1027,503],{"class":358},[269,1029,1030],{},"When enabled, the plugin:",[1032,1033,1034,1037,1043],"ol",{},[511,1035,1036],{},"Scans your code for evlog symbols",[511,1038,1039,1040,1042],{},"Adds the correct ",[273,1041,351],{}," statements automatically",[511,1044,1045,1046,1049],{},"Generates a ",[273,1047,1048],{},".d.ts"," file for TypeScript support",[278,1051,1054,1055,1057,1058,1061,1062,1064,1065,1067,1068,1070],{"color":1052,"icon":1053},"amber","i-lucide-triangle-alert","The auto-imported error constructor is ",[273,1056,979],{},", not ",[273,1059,1060],{},"createError",". This avoids conflicts with framework-native ",[273,1063,1060],{}," (Nuxt, Nitro, h3). The standalone ",[273,1066,1060],{}," from ",[273,1069,589],{}," is still available via explicit import.",[303,1072,1074],{"id":1073},"client-side-injection","Client-side injection",[269,1076,1077,1078,1081,1082,1085,1086,543,1089,1092],{},"When the ",[273,1079,1080],{},"client"," option is provided, the plugin injects a ",[273,1083,1084],{},"\u003Cscript>"," tag into HTML pages that initializes the client-side logger. This enables ",[273,1087,1088],{},"log.info()",[273,1090,1091],{},"log.error()",", etc. in browser code.",[308,1094,1096],{"className":341,"code":1095,"filename":338,"language":343,"meta":313,"style":313},"evlog({\n  service: 'my-api',\n  client: {\n    console: false,\n    transport: {\n      enabled: true,\n      endpoint: '\u002Fapi\u002F_evlog\u002Fingest',\n    },\n  },\n})\n",[273,1097,1098,1106,1120,1130,1142,1151,1162,1178,1183,1188],{"__ignoreMap":313},[317,1099,1100,1102,1104],{"class":319,"line":320},[317,1101,589],{"class":410},[317,1103,413],{"class":358},[317,1105,416],{"class":354},[317,1107,1108,1110,1112,1114,1116,1118],{"class":319,"line":377},[317,1109,730],{"class":422},[317,1111,426],{"class":354},[317,1113,368],{"class":354},[317,1115,452],{"class":327},[317,1117,455],{"class":354},[317,1119,458],{"class":354},[317,1121,1122,1125,1127],{"class":319,"line":394},[317,1123,1124],{"class":422},"  client",[317,1126,426],{"class":354},[317,1128,1129],{"class":354}," {\n",[317,1131,1132,1135,1137,1140],{"class":319,"line":401},[317,1133,1134],{"class":422},"    console",[317,1136,426],{"class":354},[317,1138,1139],{"class":843}," false",[317,1141,458],{"class":354},[317,1143,1144,1147,1149],{"class":319,"line":419},[317,1145,1146],{"class":422},"    transport",[317,1148,426],{"class":354},[317,1150,1129],{"class":354},[317,1152,1153,1156,1158,1160],{"class":319,"line":432},[317,1154,1155],{"class":422},"      enabled",[317,1157,426],{"class":354},[317,1159,844],{"class":843},[317,1161,458],{"class":354},[317,1163,1164,1167,1169,1171,1174,1176],{"class":319,"line":442},[317,1165,1166],{"class":422},"      endpoint",[317,1168,426],{"class":354},[317,1170,368],{"class":354},[317,1172,1173],{"class":327},"\u002Fapi\u002F_evlog\u002Fingest",[317,1175,455],{"class":354},[317,1177,458],{"class":354},[317,1179,1180],{"class":319,"line":461},[317,1181,1182],{"class":354},"    },\n",[317,1184,1185],{"class":319,"line":478},[317,1186,1187],{"class":354},"  },\n",[317,1189,1190,1192],{"class":319,"line":489},[317,1191,500],{"class":354},[317,1193,503],{"class":358},[299,1195,165],{"id":1196},"configuration",[1198,1199,1200,1219],"table",{},[1201,1202,1203],"thead",{},[1204,1205,1206,1210,1213,1216],"tr",{},[1207,1208,1209],"th",{},"Option",[1207,1211,1212],{},"Type",[1207,1214,1215],{},"Default",[1207,1217,1218],{},"Description",[1220,1221,1222,1242,1258,1278,1296,1313,1332,1350,1368,1391],"tbody",{},[1204,1223,1224,1229,1234,1239],{},[1225,1226,1227],"td",{},[273,1228,686],{},[1225,1230,1231],{},[273,1232,1233],{},"string",[1225,1235,1236],{},[273,1237,1238],{},"'app'",[1225,1240,1241],{},"Service name in logs",[1204,1243,1244,1248,1252,1255],{},[1225,1245,1246],{},[273,1247,689],{},[1225,1249,1250],{},[273,1251,1233],{},[1225,1253,1254],{},"Auto-detected",[1225,1256,1257],{},"Environment name",[1204,1259,1260,1264,1269,1275],{},[1225,1261,1262],{},[273,1263,692],{},[1225,1265,1266],{},[273,1267,1268],{},"boolean",[1225,1270,1271,1274],{},[273,1272,1273],{},"true"," in dev",[1225,1276,1277],{},"Pretty print logs",[1204,1279,1280,1284,1288,1293],{},[1225,1281,1282],{},[273,1283,695],{},[1225,1285,1286],{},[273,1287,1268],{},[1225,1289,1290],{},[273,1291,1292],{},"false",[1225,1294,1295],{},"Suppress console output",[1204,1297,1298,1302,1306,1310],{},[1225,1299,1300],{},[273,1301,698],{},[1225,1303,1304],{},[273,1305,1268],{},[1225,1307,1308],{},[273,1309,1273],{},[1225,1311,1312],{},"Enable\u002Fdisable all logging",[1204,1314,1315,1319,1324,1329],{},[1225,1316,1317],{},[273,1318,292],{},[1225,1320,1321],{},[273,1322,1323],{},"LogLevel[]",[1225,1325,1326],{},[273,1327,1328],{},"['debug']",[1225,1330,1331],{},"Log levels to remove from production builds",[1204,1333,1334,1338,1343,1347],{},[1225,1335,1336],{},[273,1337,296],{},[1225,1339,1340],{},[273,1341,1342],{},"boolean | 'dev'",[1225,1344,1345],{},[273,1346,1292],{},[1225,1348,1349],{},"Inject source file:line into log calls",[1204,1351,1352,1357,1361,1365],{},[1225,1353,1354],{},[273,1355,1356],{},"autoImports",[1225,1358,1359],{},[273,1360,1268],{},[1225,1362,1363],{},[273,1364,1292],{},[1225,1366,1367],{},"Auto-import evlog symbols",[1204,1369,1370,1374,1379,1382],{},[1225,1371,1372],{},[273,1373,1080],{},[1225,1375,1376],{},[273,1377,1378],{},"object",[1225,1380,1381],{},"—",[1225,1383,1384,1385,543,1388,484],{},"Client-side injection config (",[273,1386,1387],{},"console",[273,1389,1390],{},"transport",[1204,1392,1393,1397,1401,1403],{},[1225,1394,1395],{},[273,1396,701],{},[1225,1398,1399],{},[273,1400,1378],{},[1225,1402,1381],{},[1225,1404,1405],{},"Head\u002Ftail sampling rates",[299,1407,1409],{"id":1408},"nuxt-integration","Nuxt Integration",[269,1411,1412,1413,293,1415,1417,1418,426],{},"The Nuxt module exposes ",[273,1414,292],{},[273,1416,296],{}," directly in ",[273,1419,1420],{},"nuxt.config.ts",[308,1422,1424],{"className":341,"code":1423,"filename":1420,"language":343,"meta":313,"style":313},"export default defineNuxtConfig({\n  modules: ['evlog\u002Fnuxt'],\n  evlog: {\n    env: { service: 'my-app' },\n    strip: ['debug'],           \u002F\u002F Default\n    sourceLocation: 'dev',      \u002F\u002F Inject in dev only\n  },\n})\n",[273,1425,1426,1439,1460,1469,1492,1515,1534,1538],{"__ignoreMap":313},[317,1427,1428,1430,1432,1435,1437],{"class":319,"line":320},[317,1429,404],{"class":350},[317,1431,407],{"class":350},[317,1433,1434],{"class":410}," defineNuxtConfig",[317,1436,413],{"class":358},[317,1438,416],{"class":354},[317,1440,1441,1444,1446,1449,1451,1453,1455,1458],{"class":319,"line":377},[317,1442,1443],{"class":422},"  modules",[317,1445,426],{"class":354},[317,1447,1448],{"class":358}," [",[317,1450,455],{"class":354},[317,1452,288],{"class":327},[317,1454,455],{"class":354},[317,1456,1457],{"class":358},"]",[317,1459,458],{"class":354},[317,1461,1462,1465,1467],{"class":319,"line":394},[317,1463,1464],{"class":422},"  evlog",[317,1466,426],{"class":354},[317,1468,1129],{"class":354},[317,1470,1471,1474,1476,1478,1480,1482,1484,1487,1489],{"class":319,"line":401},[317,1472,1473],{"class":422},"    env",[317,1475,426],{"class":354},[317,1477,355],{"class":354},[317,1479,611],{"class":422},[317,1481,426],{"class":354},[317,1483,368],{"class":354},[317,1485,1486],{"class":327},"my-app",[317,1488,455],{"class":354},[317,1490,1491],{"class":354}," },\n",[317,1493,1494,1497,1499,1501,1503,1506,1508,1510,1512],{"class":319,"line":419},[317,1495,1496],{"class":422},"    strip",[317,1498,426],{"class":354},[317,1500,1448],{"class":358},[317,1502,455],{"class":354},[317,1504,1505],{"class":327},"debug",[317,1507,455],{"class":354},[317,1509,1457],{"class":358},[317,1511,577],{"class":354},[317,1513,1514],{"class":564},"           \u002F\u002F Default\n",[317,1516,1517,1520,1522,1524,1527,1529,1531],{"class":319,"line":432},[317,1518,1519],{"class":422},"    sourceLocation",[317,1521,426],{"class":354},[317,1523,368],{"class":354},[317,1525,1526],{"class":327},"dev",[317,1528,455],{"class":354},[317,1530,577],{"class":354},[317,1532,1533],{"class":564},"      \u002F\u002F Inject in dev only\n",[317,1535,1536],{"class":319,"line":442},[317,1537,1187],{"class":354},[317,1539,1540,1542],{"class":319,"line":461},[317,1541,500],{"class":354},[317,1543,503],{"class":358},[299,1545,1547],{"id":1546},"vite-compatibility","Vite Compatibility",[269,1549,1550,1551,1554,1555,1558,1559,293,1562,1565],{},"The plugin supports ",[282,1552,1553],{},"Vite 7+"," and is optimized for ",[282,1556,1557],{},"Vite 8"," (Rolldown). On Vite 8, transform hooks use Rolldown-native ",[273,1560,1561],{},"filter",[273,1563,1564],{},"moduleType"," for maximum performance — non-matching files are skipped entirely on the Rust side without crossing the JS bridge.",[1567,1568,1569],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html 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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}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":313,"searchDepth":377,"depth":377,"links":1571},[1572,1577,1584,1585,1586],{"id":301,"depth":377,"text":20,"children":1573},[1574,1575],{"id":305,"depth":394,"text":306},{"id":334,"depth":394,"text":1576},"2. Add to vite.config.ts",{"id":527,"depth":377,"text":528,"children":1578},[1579,1580,1581,1582,1583],{"id":531,"depth":394,"text":532},{"id":705,"depth":394,"text":706},{"id":798,"depth":394,"text":799},{"id":970,"depth":394,"text":971},{"id":1073,"depth":394,"text":1074},{"id":1196,"depth":377,"text":165},{"id":1408,"depth":377,"text":1409},{"id":1546,"depth":377,"text":1547},"Build-time optimizations for any Vite-based framework — auto-init, debug stripping, source location injection, and optional auto-imports.","md",[1590],{"label":1591,"icon":1592,"to":1593,"color":1594,"variant":1595},"Source Code","i-simple-icons-github","https:\u002F\u002Fgithub.com\u002FHugoRCD\u002Fevlog\u002Ftree\u002Fmain\u002Fpackages\u002Fevlog\u002Fsrc\u002Fvite","neutral","subtle",{},{"icon":134},{"title":131,"description":1587},"7yYVMBXuCwuxhSzMEuKl4WnB-5Y6dfIX0DFVHU3wJEg",[1601,1603],{"title":126,"path":127,"stem":128,"description":1602,"icon":129,"children":-1},"Learn how to design effective wide events that capture everything you need in a single log. One comprehensive event per request with full context.",{"title":136,"path":137,"stem":138,"description":1604,"icon":139,"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.",1775236123350]