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