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