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