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