[{"data":1,"prerenderedAt":2434},["ShallowReactive",2],{"navigation_docs":3,"-core-concepts-configuration":402,"-core-concepts-configuration-surround":2429},[4,35,159,201,289,299,386],{"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],{"title":295,"path":296,"stem":297,"icon":298},"FS reader","\u002Fbuild-on-top\u002Ffs-reader","5.build-on-top\u002F4.fs-reader","i-lucide-folder-search",{"title":300,"path":301,"stem":302,"children":303,"page":34},"Adapters","\u002Fadapters","6.adapters",[304,307,347,362],{"title":41,"path":305,"stem":306,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":308,"path":309,"stem":310,"children":311,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[312,317,322,327,332,337,342],{"title":313,"path":314,"stem":315,"icon":316},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":318,"path":319,"stem":320,"icon":321},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":323,"path":324,"stem":325,"icon":326},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":328,"path":329,"stem":330,"icon":331},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":333,"path":334,"stem":335,"icon":336},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":338,"path":339,"stem":340,"icon":341},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":343,"path":344,"stem":345,"icon":346},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":348,"path":349,"stem":350,"children":351,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[352,357],{"title":353,"path":354,"stem":355,"icon":356},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":358,"path":359,"stem":360,"icon":361},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":363,"path":364,"stem":365,"children":366,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[367,372,377,381],{"title":368,"path":369,"stem":370,"icon":371},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline","i-lucide-workflow",{"title":373,"path":374,"stem":375,"icon":376},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":378,"path":379,"stem":380,"icon":83},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":382,"path":383,"stem":384,"icon":385},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":387,"path":388,"stem":389,"children":390,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[391,394,398],{"title":41,"path":392,"stem":393,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":395,"path":396,"stem":397,"icon":288},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":399,"path":400,"stem":401,"icon":83},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":403,"title":170,"body":404,"description":2417,"extension":2418,"links":2419,"meta":2425,"navigation":2426,"path":171,"seo":2427,"stem":172,"__hash__":2428},"docs\u002F3.core-concepts\u002F1.configuration.md",{"type":405,"value":406,"toc":2401},"minimark",[407,420,430,437,712,939,946,1003,1019,1023,1033,1172,1176,1182,1282,1291,1295,1298,1954,2080,2102,2106,2115,2240,2244,2247,2250,2260,2355,2362,2365,2390,2397],[408,409,410,411,415,416,419],"p",{},"evlog has two configuration surfaces: ",[412,413,414],"strong",{},"global options"," set once at startup, and ",[412,417,418],{},"middleware options"," set per-framework integration. This page documents both.",[421,422,424,425,429],"h2",{"id":423},"global-options-initlogger","Global Options (",[426,427,428],"code",{},"initLogger",")",[408,431,432,433,436],{},"These options apply to all frameworks. Call ",[426,434,435],{},"initLogger()"," once at application startup for standalone frameworks (Hono, Express, Fastify, Elysia, NestJS, SvelteKit, Cloudflare Workers). For Nuxt and Nitro, these are set via module config and passed through automatically.",[438,439,445],"pre",{"className":440,"code":441,"filename":442,"language":443,"meta":444,"style":444},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { initLogger } from 'evlog'\nimport { createAxiomDrain } from 'evlog\u002Faxiom'\n\ninitLogger({\n  enabled: true,\n  env: { service: 'my-api', environment: 'production' },\n  pretty: false,\n  silent: false,\n  stringify: true,\n  minLevel: 'info',\n  sampling: { rates: { info: 10 }, keep: [{ status: 400 }] },\n  drain: createAxiomDrain(),\n})\n","src\u002Findex.ts","typescript","",[426,446,447,480,501,508,520,537,578,591,603,615,632,688,703],{"__ignoreMap":444},[448,449,452,456,460,464,467,470,473,477],"span",{"class":450,"line":451},"line",1,[448,453,455],{"class":454},"s7zQu","import",[448,457,459],{"class":458},"sMK4o"," {",[448,461,463],{"class":462},"sTEyZ"," initLogger",[448,465,466],{"class":458}," }",[448,468,469],{"class":454}," from",[448,471,472],{"class":458}," '",[448,474,476],{"class":475},"sfazB","evlog",[448,478,479],{"class":458},"'\n",[448,481,483,485,487,490,492,494,496,499],{"class":450,"line":482},2,[448,484,455],{"class":454},[448,486,459],{"class":458},[448,488,489],{"class":462}," createAxiomDrain",[448,491,466],{"class":458},[448,493,469],{"class":454},[448,495,472],{"class":458},[448,497,498],{"class":475},"evlog\u002Faxiom",[448,500,479],{"class":458},[448,502,504],{"class":450,"line":503},3,[448,505,507],{"emptyLinePlaceholder":506},true,"\n",[448,509,511,514,517],{"class":450,"line":510},4,[448,512,428],{"class":513},"s2Zo4",[448,515,516],{"class":462},"(",[448,518,519],{"class":458},"{\n",[448,521,523,527,530,534],{"class":450,"line":522},5,[448,524,526],{"class":525},"swJcz","  enabled",[448,528,529],{"class":458},":",[448,531,533],{"class":532},"sfNiH"," true",[448,535,536],{"class":458},",\n",[448,538,540,543,545,547,550,552,554,557,560,563,566,568,570,573,575],{"class":450,"line":539},6,[448,541,542],{"class":525},"  env",[448,544,529],{"class":458},[448,546,459],{"class":458},[448,548,549],{"class":525}," service",[448,551,529],{"class":458},[448,553,472],{"class":458},[448,555,556],{"class":475},"my-api",[448,558,559],{"class":458},"'",[448,561,562],{"class":458},",",[448,564,565],{"class":525}," environment",[448,567,529],{"class":458},[448,569,472],{"class":458},[448,571,572],{"class":475},"production",[448,574,559],{"class":458},[448,576,577],{"class":458}," },\n",[448,579,581,584,586,589],{"class":450,"line":580},7,[448,582,583],{"class":525},"  pretty",[448,585,529],{"class":458},[448,587,588],{"class":532}," false",[448,590,536],{"class":458},[448,592,594,597,599,601],{"class":450,"line":593},8,[448,595,596],{"class":525},"  silent",[448,598,529],{"class":458},[448,600,588],{"class":532},[448,602,536],{"class":458},[448,604,606,609,611,613],{"class":450,"line":605},9,[448,607,608],{"class":525},"  stringify",[448,610,529],{"class":458},[448,612,533],{"class":532},[448,614,536],{"class":458},[448,616,618,621,623,625,628,630],{"class":450,"line":617},10,[448,619,620],{"class":525},"  minLevel",[448,622,529],{"class":458},[448,624,472],{"class":458},[448,626,627],{"class":475},"info",[448,629,559],{"class":458},[448,631,536],{"class":458},[448,633,635,638,640,642,645,647,649,652,654,658,661,664,666,669,672,675,677,680,682,685],{"class":450,"line":634},11,[448,636,637],{"class":525},"  sampling",[448,639,529],{"class":458},[448,641,459],{"class":458},[448,643,644],{"class":525}," rates",[448,646,529],{"class":458},[448,648,459],{"class":458},[448,650,651],{"class":525}," info",[448,653,529],{"class":458},[448,655,657],{"class":656},"sbssI"," 10",[448,659,660],{"class":458}," },",[448,662,663],{"class":525}," keep",[448,665,529],{"class":458},[448,667,668],{"class":462}," [",[448,670,671],{"class":458},"{",[448,673,674],{"class":525}," status",[448,676,529],{"class":458},[448,678,679],{"class":656}," 400",[448,681,466],{"class":458},[448,683,684],{"class":462},"] ",[448,686,687],{"class":458},"},\n",[448,689,691,694,696,698,701],{"class":450,"line":690},12,[448,692,693],{"class":525},"  drain",[448,695,529],{"class":458},[448,697,489],{"class":513},[448,699,700],{"class":462},"()",[448,702,536],{"class":458},[448,704,706,709],{"class":450,"line":705},13,[448,707,708],{"class":458},"}",[448,710,711],{"class":462},")\n",[713,714,715,734],"table",{},[716,717,718],"thead",{},[719,720,721,725,728,731],"tr",{},[722,723,724],"th",{},"Option",[722,726,727],{},"Type",[722,729,730],{},"Default",[722,732,733],{},"Description",[735,736,737,762,780,802,820,844,872,895,920],"tbody",{},[719,738,739,745,750,755],{},[740,741,742],"td",{},[426,743,744],{},"enabled",[740,746,747],{},[426,748,749],{},"boolean",[740,751,752],{},[426,753,754],{},"true",[740,756,757,758,761],{},"Enable\u002Fdisable all logging globally. When ",[426,759,760],{},"false",", all operations become no-ops",[719,763,764,769,774,777],{},[740,765,766],{},[426,767,768],{},"env",[740,770,771],{},[426,772,773],{},"Partial\u003CEnvironmentContext>",[740,775,776],{},"Auto-detected",[740,778,779],{},"Environment context overrides (see below)",[719,781,782,787,791,796],{},[740,783,784],{},[426,785,786],{},"pretty",[740,788,789],{},[426,790,749],{},[740,792,793,795],{},[426,794,754],{}," in dev",[740,797,798,799],{},"Pretty print with tree formatting. Auto-detected based on ",[426,800,801],{},"NODE_ENV",[719,803,804,809,813,817],{},[740,805,806],{},[426,807,808],{},"silent",[740,810,811],{},[426,812,749],{},[740,814,815],{},[426,816,760],{},[740,818,819],{},"Suppress console output. Events are still built, sampled, and passed to drains",[719,821,822,827,831,835],{},[740,823,824],{},[426,825,826],{},"stringify",[740,828,829],{},[426,830,749],{},[740,832,833],{},[426,834,754],{},[740,836,837,838,840,841,843],{},"Emit JSON strings when ",[426,839,786],{}," is disabled. Set to ",[426,842,760],{}," for Cloudflare Workers",[719,845,846,851,856,861],{},[740,847,848],{},[426,849,850],{},"minLevel",[740,852,853],{},[426,854,855],{},"'debug' | 'info' | 'warn' | 'error'",[740,857,858],{},[426,859,860],{},"'debug'",[740,862,863,864,867,868,871],{},"Minimum severity for the global ",[426,865,866],{},"log"," API only (not ",[426,869,870],{},"createLogger"," \u002F request wide events). Order: debug \u003C info \u003C warn \u003C error",[719,873,874,879,884,889],{},[740,875,876],{},[426,877,878],{},"sampling",[740,880,881],{},[426,882,883],{},"SamplingConfig",[740,885,886],{},[426,887,888],{},"undefined",[740,890,891,892],{},"Head and tail sampling configuration. See ",[893,894,175],"a",{"href":176},[719,896,897,902,907,912],{},[740,898,899],{},[426,900,901],{},"redact",[740,903,904],{},[426,905,906],{},"boolean | RedactConfig",[740,908,909,911],{},[426,910,754],{}," in production",[740,913,914,915,917,918],{},"Enabled by default in production. ",[426,916,760],{}," to disable. Object for fine-grained control. See ",[893,919,197],{"href":198},[719,921,922,927,932,936],{},[740,923,924],{},[426,925,926],{},"drain",[740,928,929],{},[426,930,931],{},"(ctx: DrainContext) => void",[740,933,934],{},[426,935,888],{},[740,937,938],{},"Drain callback for sending events to external services",[940,941,943,945],"h3",{"id":942},"minlevel-vs-sampling",[426,944,850],{}," vs sampling",[947,948,949,987],"ul",{},[950,951,952,956,957,960,961,964,965,968,969,972,973,976,977,982,983,986],"li",{},[412,953,954],{},[426,955,850],{}," is a ",[412,958,959],{},"hard threshold"," on the simple ",[426,962,963],{},"log.*"," API: levels below the threshold are never emitted. It does ",[412,966,967],{},"not"," apply to wide events from ",[426,970,971],{},"useLogger"," \u002F ",[426,974,975],{},"createLogger().emit()"," — use ",[412,978,979],{},[426,980,981],{},"sampling.rates"," (and tail ",[426,984,985],{},"keep",") for request volume.",[950,988,989,992,993,995,996,999,1000,1002],{},[412,990,991],{},"Head sampling"," (",[426,994,981],{},") is ",[412,997,998],{},"probabilistic"," on what is already allowed by ",[426,1001,850],{}," for simple logs.",[408,1004,1005,1006,972,1009,1012,1013,1015,1016,1018],{},"Evaluation order for ",[426,1007,1008],{},"log.info",[426,1010,1011],{},"log.debug"," \u002F etc.: ",[426,1014,744],{}," → ",[426,1017,850],{}," → head sampling → output.",[940,1020,1022],{"id":1021},"environment-context","Environment Context",[408,1024,1025,1026,1028,1029,1032],{},"The ",[426,1027,768],{}," option controls the fields included in every log event. Most values are auto-detected from environment variables and ",[426,1030,1031],{},"package.json",".",[713,1034,1035,1049],{},[716,1036,1037],{},[719,1038,1039,1042,1044,1046],{},[722,1040,1041],{},"Field",[722,1043,727],{},[722,1045,730],{},[722,1047,1048],{},"Auto-detected from",[735,1050,1051,1077,1097,1120,1146],{},[719,1052,1053,1058,1063,1068],{},[740,1054,1055],{},[426,1056,1057],{},"service",[740,1059,1060],{},[426,1061,1062],{},"string",[740,1064,1065],{},[426,1066,1067],{},"'app'",[740,1069,1070,1073,1074,1076],{},[426,1071,1072],{},"SERVICE_NAME",", ",[426,1075,1031],{}," name",[719,1078,1079,1084,1088,1093],{},[740,1080,1081],{},[426,1082,1083],{},"environment",[740,1085,1086],{},[426,1087,1062],{},[740,1089,1090],{},[426,1091,1092],{},"'development'",[740,1094,1095],{},[426,1096,801],{},[719,1098,1099,1104,1108,1112],{},[740,1100,1101],{},[426,1102,1103],{},"version",[740,1105,1106],{},[426,1107,1062],{},[740,1109,1110],{},[426,1111,888],{},[740,1113,1114,1073,1117,1119],{},[426,1115,1116],{},"APP_VERSION",[426,1118,1031],{}," version",[719,1121,1122,1127,1131,1135],{},[740,1123,1124],{},[426,1125,1126],{},"commitHash",[740,1128,1129],{},[426,1130,1062],{},[740,1132,1133],{},[426,1134,888],{},[740,1136,1137,1073,1140,1073,1143],{},[426,1138,1139],{},"COMMIT_SHA",[426,1141,1142],{},"GIT_COMMIT",[426,1144,1145],{},"VERCEL_GIT_COMMIT_SHA",[719,1147,1148,1153,1157,1161],{},[740,1149,1150],{},[426,1151,1152],{},"region",[740,1154,1155],{},[426,1156,1062],{},[740,1158,1159],{},[426,1160,888],{},[740,1162,1163,1073,1166,1073,1169],{},[426,1164,1165],{},"FLY_REGION",[426,1167,1168],{},"AWS_REGION",[426,1170,1171],{},"VERCEL_REGION",[940,1173,1175],{"id":1174},"silent-mode","Silent Mode",[408,1177,1178,1179,1181],{},"Use ",[426,1180,808],{}," when your deployment platform captures stdout as its primary log ingestion (GCP Cloud Run, AWS Lambda, Fly.io, Railway, etc.) and you want a drain adapter to control the output format.",[438,1183,1185],{"className":440,"code":1184,"filename":442,"language":443,"meta":444,"style":444},"import { initLogger } from 'evlog'\nimport { createAxiomDrain } from 'evlog\u002Faxiom'\n\ninitLogger({\n  silent: process.env.NODE_ENV === 'production',\n  drain: createAxiomDrain(),\n})\n",[426,1186,1187,1205,1223,1227,1235,1264,1276],{"__ignoreMap":444},[448,1188,1189,1191,1193,1195,1197,1199,1201,1203],{"class":450,"line":451},[448,1190,455],{"class":454},[448,1192,459],{"class":458},[448,1194,463],{"class":462},[448,1196,466],{"class":458},[448,1198,469],{"class":454},[448,1200,472],{"class":458},[448,1202,476],{"class":475},[448,1204,479],{"class":458},[448,1206,1207,1209,1211,1213,1215,1217,1219,1221],{"class":450,"line":482},[448,1208,455],{"class":454},[448,1210,459],{"class":458},[448,1212,489],{"class":462},[448,1214,466],{"class":458},[448,1216,469],{"class":454},[448,1218,472],{"class":458},[448,1220,498],{"class":475},[448,1222,479],{"class":458},[448,1224,1225],{"class":450,"line":503},[448,1226,507],{"emptyLinePlaceholder":506},[448,1228,1229,1231,1233],{"class":450,"line":510},[448,1230,428],{"class":513},[448,1232,516],{"class":462},[448,1234,519],{"class":458},[448,1236,1237,1239,1241,1244,1246,1248,1250,1253,1256,1258,1260,1262],{"class":450,"line":522},[448,1238,596],{"class":525},[448,1240,529],{"class":458},[448,1242,1243],{"class":462}," process",[448,1245,1032],{"class":458},[448,1247,768],{"class":462},[448,1249,1032],{"class":458},[448,1251,1252],{"class":462},"NODE_ENV ",[448,1254,1255],{"class":458},"===",[448,1257,472],{"class":458},[448,1259,572],{"class":475},[448,1261,559],{"class":458},[448,1263,536],{"class":458},[448,1265,1266,1268,1270,1272,1274],{"class":450,"line":539},[448,1267,693],{"class":525},[448,1269,529],{"class":458},[448,1271,489],{"class":513},[448,1273,700],{"class":462},[448,1275,536],{"class":458},[448,1277,1278,1280],{"class":450,"line":580},[448,1279,708],{"class":458},[448,1281,711],{"class":462},[1283,1284,1287,1288,1290],"callout",{"color":1285,"icon":1286},"warning","i-lucide-alert-triangle","If ",[426,1289,808],{}," is enabled without a drain, events are built and sampled but never output anywhere. evlog will warn you about this at startup.",[421,1292,1294],{"id":1293},"middleware-options","Middleware Options",[408,1296,1297],{},"These options are passed to the framework middleware\u002Fplugin. They control per-request behavior: which routes to log, how to drain and enrich events, and custom tail sampling logic.",[1299,1300,1301,1601,1795,1892],"code-group",{},[438,1302,1304],{"className":440,"code":1303,"filename":216,"language":443,"meta":444,"style":444},"\u002F\u002F lib\u002Fevlog.ts\nimport { createEvlog } from 'evlog\u002Fnext'\nimport { createAxiomDrain } from 'evlog\u002Faxiom'\n\nexport const { withEvlog, useLogger, log, createError } = createEvlog({\n  service: 'my-app',\n  include: ['\u002Fapi\u002F**'],\n  exclude: ['\u002Fapi\u002Fhealth'],\n  routes: { '\u002Fapi\u002Fauth\u002F**': { service: 'auth' } },\n  drain: createAxiomDrain(),\n  enrich: (ctx) => { ctx.event.region = process.env.FLY_REGION },\n  keep: (ctx) => { if (ctx.duration > 2000) ctx.shouldKeep = true },\n})\n",[426,1305,1306,1312,1332,1350,1354,1394,1410,1431,1451,1486,1498,1544,1595],{"__ignoreMap":444},[448,1307,1308],{"class":450,"line":451},[448,1309,1311],{"class":1310},"sHwdD","\u002F\u002F lib\u002Fevlog.ts\n",[448,1313,1314,1316,1318,1321,1323,1325,1327,1330],{"class":450,"line":482},[448,1315,455],{"class":454},[448,1317,459],{"class":458},[448,1319,1320],{"class":462}," createEvlog",[448,1322,466],{"class":458},[448,1324,469],{"class":454},[448,1326,472],{"class":458},[448,1328,1329],{"class":475},"evlog\u002Fnext",[448,1331,479],{"class":458},[448,1333,1334,1336,1338,1340,1342,1344,1346,1348],{"class":450,"line":503},[448,1335,455],{"class":454},[448,1337,459],{"class":458},[448,1339,489],{"class":462},[448,1341,466],{"class":458},[448,1343,469],{"class":454},[448,1345,472],{"class":458},[448,1347,498],{"class":475},[448,1349,479],{"class":458},[448,1351,1352],{"class":450,"line":510},[448,1353,507],{"emptyLinePlaceholder":506},[448,1355,1356,1359,1363,1365,1368,1370,1373,1375,1378,1380,1383,1385,1388,1390,1392],{"class":450,"line":522},[448,1357,1358],{"class":454},"export",[448,1360,1362],{"class":1361},"spNyl"," const",[448,1364,459],{"class":458},[448,1366,1367],{"class":462}," withEvlog",[448,1369,562],{"class":458},[448,1371,1372],{"class":462}," useLogger",[448,1374,562],{"class":458},[448,1376,1377],{"class":462}," log",[448,1379,562],{"class":458},[448,1381,1382],{"class":462}," createError ",[448,1384,708],{"class":458},[448,1386,1387],{"class":458}," =",[448,1389,1320],{"class":513},[448,1391,516],{"class":462},[448,1393,519],{"class":458},[448,1395,1396,1399,1401,1403,1406,1408],{"class":450,"line":539},[448,1397,1398],{"class":525},"  service",[448,1400,529],{"class":458},[448,1402,472],{"class":458},[448,1404,1405],{"class":475},"my-app",[448,1407,559],{"class":458},[448,1409,536],{"class":458},[448,1411,1412,1415,1417,1419,1421,1424,1426,1429],{"class":450,"line":580},[448,1413,1414],{"class":525},"  include",[448,1416,529],{"class":458},[448,1418,668],{"class":462},[448,1420,559],{"class":458},[448,1422,1423],{"class":475},"\u002Fapi\u002F**",[448,1425,559],{"class":458},[448,1427,1428],{"class":462},"]",[448,1430,536],{"class":458},[448,1432,1433,1436,1438,1440,1442,1445,1447,1449],{"class":450,"line":593},[448,1434,1435],{"class":525},"  exclude",[448,1437,529],{"class":458},[448,1439,668],{"class":462},[448,1441,559],{"class":458},[448,1443,1444],{"class":475},"\u002Fapi\u002Fhealth",[448,1446,559],{"class":458},[448,1448,1428],{"class":462},[448,1450,536],{"class":458},[448,1452,1453,1456,1458,1460,1462,1465,1467,1469,1471,1473,1475,1477,1480,1482,1484],{"class":450,"line":605},[448,1454,1455],{"class":525},"  routes",[448,1457,529],{"class":458},[448,1459,459],{"class":458},[448,1461,472],{"class":458},[448,1463,1464],{"class":525},"\u002Fapi\u002Fauth\u002F**",[448,1466,559],{"class":458},[448,1468,529],{"class":458},[448,1470,459],{"class":458},[448,1472,549],{"class":525},[448,1474,529],{"class":458},[448,1476,472],{"class":458},[448,1478,1479],{"class":475},"auth",[448,1481,559],{"class":458},[448,1483,466],{"class":458},[448,1485,577],{"class":458},[448,1487,1488,1490,1492,1494,1496],{"class":450,"line":617},[448,1489,693],{"class":525},[448,1491,529],{"class":458},[448,1493,489],{"class":513},[448,1495,700],{"class":462},[448,1497,536],{"class":458},[448,1499,1500,1503,1505,1507,1511,1513,1516,1518,1521,1523,1526,1528,1530,1532,1534,1536,1538,1540,1542],{"class":450,"line":634},[448,1501,1502],{"class":513},"  enrich",[448,1504,529],{"class":458},[448,1506,992],{"class":458},[448,1508,1510],{"class":1509},"sHdIc","ctx",[448,1512,429],{"class":458},[448,1514,1515],{"class":1361}," =>",[448,1517,459],{"class":458},[448,1519,1520],{"class":462}," ctx",[448,1522,1032],{"class":458},[448,1524,1525],{"class":462},"event",[448,1527,1032],{"class":458},[448,1529,1152],{"class":462},[448,1531,1387],{"class":458},[448,1533,1243],{"class":462},[448,1535,1032],{"class":458},[448,1537,768],{"class":462},[448,1539,1032],{"class":458},[448,1541,1165],{"class":462},[448,1543,577],{"class":458},[448,1545,1546,1549,1551,1553,1555,1557,1559,1561,1564,1566,1568,1570,1573,1576,1579,1582,1584,1586,1589,1591,1593],{"class":450,"line":690},[448,1547,1548],{"class":513},"  keep",[448,1550,529],{"class":458},[448,1552,992],{"class":458},[448,1554,1510],{"class":1509},[448,1556,429],{"class":458},[448,1558,1515],{"class":1361},[448,1560,459],{"class":458},[448,1562,1563],{"class":454}," if",[448,1565,992],{"class":525},[448,1567,1510],{"class":462},[448,1569,1032],{"class":458},[448,1571,1572],{"class":462},"duration",[448,1574,1575],{"class":458}," >",[448,1577,1578],{"class":656}," 2000",[448,1580,1581],{"class":525},") ",[448,1583,1510],{"class":462},[448,1585,1032],{"class":458},[448,1587,1588],{"class":462},"shouldKeep",[448,1590,1387],{"class":458},[448,1592,533],{"class":532},[448,1594,577],{"class":458},[448,1596,1597,1599],{"class":450,"line":705},[448,1598,708],{"class":458},[448,1600,711],{"class":462},[438,1602,1604],{"className":440,"code":1603,"filename":246,"language":443,"meta":444,"style":444},"app.use(evlog({\n  include: ['\u002Fapi\u002F**'],\n  exclude: ['\u002Fapi\u002Fhealth'],\n  routes: { '\u002Fapi\u002Fauth\u002F**': { service: 'auth' } },\n  drain: createAxiomDrain(),\n  enrich: (ctx) => { ctx.event.region = process.env.FLY_REGION },\n  keep: (ctx) => { if (ctx.duration > 2000) ctx.shouldKeep = true },\n}))\n",[426,1605,1606,1624,1642,1660,1692,1704,1744,1788],{"__ignoreMap":444},[448,1607,1608,1611,1613,1616,1618,1620,1622],{"class":450,"line":451},[448,1609,1610],{"class":462},"app",[448,1612,1032],{"class":458},[448,1614,1615],{"class":513},"use",[448,1617,516],{"class":462},[448,1619,476],{"class":513},[448,1621,516],{"class":462},[448,1623,519],{"class":458},[448,1625,1626,1628,1630,1632,1634,1636,1638,1640],{"class":450,"line":482},[448,1627,1414],{"class":525},[448,1629,529],{"class":458},[448,1631,668],{"class":462},[448,1633,559],{"class":458},[448,1635,1423],{"class":475},[448,1637,559],{"class":458},[448,1639,1428],{"class":462},[448,1641,536],{"class":458},[448,1643,1644,1646,1648,1650,1652,1654,1656,1658],{"class":450,"line":503},[448,1645,1435],{"class":525},[448,1647,529],{"class":458},[448,1649,668],{"class":462},[448,1651,559],{"class":458},[448,1653,1444],{"class":475},[448,1655,559],{"class":458},[448,1657,1428],{"class":462},[448,1659,536],{"class":458},[448,1661,1662,1664,1666,1668,1670,1672,1674,1676,1678,1680,1682,1684,1686,1688,1690],{"class":450,"line":510},[448,1663,1455],{"class":525},[448,1665,529],{"class":458},[448,1667,459],{"class":458},[448,1669,472],{"class":458},[448,1671,1464],{"class":525},[448,1673,559],{"class":458},[448,1675,529],{"class":458},[448,1677,459],{"class":458},[448,1679,549],{"class":525},[448,1681,529],{"class":458},[448,1683,472],{"class":458},[448,1685,1479],{"class":475},[448,1687,559],{"class":458},[448,1689,466],{"class":458},[448,1691,577],{"class":458},[448,1693,1694,1696,1698,1700,1702],{"class":450,"line":522},[448,1695,693],{"class":525},[448,1697,529],{"class":458},[448,1699,489],{"class":513},[448,1701,700],{"class":462},[448,1703,536],{"class":458},[448,1705,1706,1708,1710,1712,1714,1716,1718,1720,1722,1724,1726,1728,1730,1732,1734,1736,1738,1740,1742],{"class":450,"line":539},[448,1707,1502],{"class":513},[448,1709,529],{"class":458},[448,1711,992],{"class":458},[448,1713,1510],{"class":1509},[448,1715,429],{"class":458},[448,1717,1515],{"class":1361},[448,1719,459],{"class":458},[448,1721,1520],{"class":462},[448,1723,1032],{"class":458},[448,1725,1525],{"class":462},[448,1727,1032],{"class":458},[448,1729,1152],{"class":462},[448,1731,1387],{"class":458},[448,1733,1243],{"class":462},[448,1735,1032],{"class":458},[448,1737,768],{"class":462},[448,1739,1032],{"class":458},[448,1741,1165],{"class":462},[448,1743,577],{"class":458},[448,1745,1746,1748,1750,1752,1754,1756,1758,1760,1762,1764,1766,1768,1770,1772,1774,1776,1778,1780,1782,1784,1786],{"class":450,"line":580},[448,1747,1548],{"class":513},[448,1749,529],{"class":458},[448,1751,992],{"class":458},[448,1753,1510],{"class":1509},[448,1755,429],{"class":458},[448,1757,1515],{"class":1361},[448,1759,459],{"class":458},[448,1761,1563],{"class":454},[448,1763,992],{"class":525},[448,1765,1510],{"class":462},[448,1767,1032],{"class":458},[448,1769,1572],{"class":462},[448,1771,1575],{"class":458},[448,1773,1578],{"class":656},[448,1775,1581],{"class":525},[448,1777,1510],{"class":462},[448,1779,1032],{"class":458},[448,1781,1588],{"class":462},[448,1783,1387],{"class":458},[448,1785,533],{"class":532},[448,1787,577],{"class":458},[448,1789,1790,1792],{"class":450,"line":593},[448,1791,708],{"class":458},[448,1793,1794],{"class":462},"))\n",[438,1796,1798],{"className":440,"code":1797,"filename":241,"language":443,"meta":444,"style":444},"app.use(evlog({\n  include: ['\u002Fapi\u002F**'],\n  drain: createAxiomDrain(),\n  enrich: (ctx) => { ctx.event.region = process.env.FLY_REGION },\n}))\n",[426,1799,1800,1816,1834,1846,1886],{"__ignoreMap":444},[448,1801,1802,1804,1806,1808,1810,1812,1814],{"class":450,"line":451},[448,1803,1610],{"class":462},[448,1805,1032],{"class":458},[448,1807,1615],{"class":513},[448,1809,516],{"class":462},[448,1811,476],{"class":513},[448,1813,516],{"class":462},[448,1815,519],{"class":458},[448,1817,1818,1820,1822,1824,1826,1828,1830,1832],{"class":450,"line":482},[448,1819,1414],{"class":525},[448,1821,529],{"class":458},[448,1823,668],{"class":462},[448,1825,559],{"class":458},[448,1827,1423],{"class":475},[448,1829,559],{"class":458},[448,1831,1428],{"class":462},[448,1833,536],{"class":458},[448,1835,1836,1838,1840,1842,1844],{"class":450,"line":503},[448,1837,693],{"class":525},[448,1839,529],{"class":458},[448,1841,489],{"class":513},[448,1843,700],{"class":462},[448,1845,536],{"class":458},[448,1847,1848,1850,1852,1854,1856,1858,1860,1862,1864,1866,1868,1870,1872,1874,1876,1878,1880,1882,1884],{"class":450,"line":510},[448,1849,1502],{"class":513},[448,1851,529],{"class":458},[448,1853,992],{"class":458},[448,1855,1510],{"class":1509},[448,1857,429],{"class":458},[448,1859,1515],{"class":1361},[448,1861,459],{"class":458},[448,1863,1520],{"class":462},[448,1865,1032],{"class":458},[448,1867,1525],{"class":462},[448,1869,1032],{"class":458},[448,1871,1152],{"class":462},[448,1873,1387],{"class":458},[448,1875,1243],{"class":462},[448,1877,1032],{"class":458},[448,1879,768],{"class":462},[448,1881,1032],{"class":458},[448,1883,1165],{"class":462},[448,1885,577],{"class":458},[448,1887,1888,1890],{"class":450,"line":522},[448,1889,708],{"class":458},[448,1891,1794],{"class":462},[438,1893,1895],{"className":440,"code":1894,"filename":251,"language":443,"meta":444,"style":444},"await app.register(evlog, {\n  include: ['\u002Fapi\u002F**'],\n  drain: createAxiomDrain(),\n})\n",[426,1896,1897,1918,1936,1948],{"__ignoreMap":444},[448,1898,1899,1902,1905,1907,1910,1913,1915],{"class":450,"line":451},[448,1900,1901],{"class":454},"await",[448,1903,1904],{"class":462}," app",[448,1906,1032],{"class":458},[448,1908,1909],{"class":513},"register",[448,1911,1912],{"class":462},"(evlog",[448,1914,562],{"class":458},[448,1916,1917],{"class":458}," {\n",[448,1919,1920,1922,1924,1926,1928,1930,1932,1934],{"class":450,"line":482},[448,1921,1414],{"class":525},[448,1923,529],{"class":458},[448,1925,668],{"class":462},[448,1927,559],{"class":458},[448,1929,1423],{"class":475},[448,1931,559],{"class":458},[448,1933,1428],{"class":462},[448,1935,536],{"class":458},[448,1937,1938,1940,1942,1944,1946],{"class":450,"line":503},[448,1939,693],{"class":525},[448,1941,529],{"class":458},[448,1943,489],{"class":513},[448,1945,700],{"class":462},[448,1947,536],{"class":458},[448,1949,1950,1952],{"class":450,"line":510},[448,1951,708],{"class":458},[448,1953,711],{"class":462},[713,1955,1956,1968],{},[716,1957,1958],{},[719,1959,1960,1962,1964,1966],{},[722,1961,724],{},[722,1963,727],{},[722,1965,730],{},[722,1967,733],{},[735,1969,1970,1989,2007,2026,2043,2062],{},[719,1971,1972,1977,1982,1986],{},[740,1973,1974],{},[426,1975,1976],{},"include",[740,1978,1979],{},[426,1980,1981],{},"string[]",[740,1983,1984],{},[426,1985,888],{},[740,1987,1988],{},"Route glob patterns to log. If not set, all routes are logged",[719,1990,1991,1996,2000,2004],{},[740,1992,1993],{},[426,1994,1995],{},"exclude",[740,1997,1998],{},[426,1999,1981],{},[740,2001,2002],{},[426,2003,888],{},[740,2005,2006],{},"Route patterns to exclude. Exclusions take precedence over inclusions",[719,2008,2009,2014,2019,2023],{},[740,2010,2011],{},[426,2012,2013],{},"routes",[740,2015,2016],{},[426,2017,2018],{},"Record\u003Cstring, { service: string }>",[740,2020,2021],{},[426,2022,888],{},[740,2024,2025],{},"Route-specific service name overrides",[719,2027,2028,2032,2036,2040],{},[740,2029,2030],{},[426,2031,926],{},[740,2033,2034],{},[426,2035,931],{},[740,2037,2038],{},[426,2039,888],{},[740,2041,2042],{},"Drain callback called with every emitted event",[719,2044,2045,2050,2055,2059],{},[740,2046,2047],{},[426,2048,2049],{},"enrich",[740,2051,2052],{},[426,2053,2054],{},"(ctx: EnrichContext) => void",[740,2056,2057],{},[426,2058,888],{},[740,2060,2061],{},"Enrich callback called after emit, before drain",[719,2063,2064,2068,2073,2077],{},[740,2065,2066],{},[426,2067,985],{},[740,2069,2070],{},[426,2071,2072],{},"(ctx: TailSamplingContext) => void",[740,2074,2075],{},[426,2076,888],{},[740,2078,2079],{},"Custom tail sampling callback",[1283,2081,2082,2085,2086,1073,2089,1073,2092,2095,2096,2098,2099,2101],{"color":627,"icon":13},[412,2083,2084],{},"Nuxt and Nitro"," use module config and Nitro hooks (",[426,2087,2088],{},"evlog:drain",[426,2090,2091],{},"evlog:enrich",[426,2093,2094],{},"evlog:emit:keep",") instead of middleware options. See the ",[893,2097,211],{"href":212}," and ",[893,2100,226],{"href":227}," pages.",[940,2103,2105],{"id":2104},"middleware-drain-vs-global-drain","Middleware drain vs global drain",[408,2107,2108,2109,2111,2112,2114],{},"When a middleware ",[426,2110,926],{}," is set, it takes precedence over the global drain from ",[426,2113,435],{},". If no middleware drain is set, the global drain is used as fallback, with the benefit of receiving the full enriched event with request context (method, path, headers).",[438,2116,2118],{"className":440,"code":2117,"filename":442,"language":443,"meta":444,"style":444},"import { initLogger } from 'evlog'\nimport { createAxiomDrain } from 'evlog\u002Faxiom'\n\ninitLogger({\n  env: { service: 'my-api' },\n  drain: createAxiomDrain(), \u002F\u002F fallback: used by singleton log API AND middleware (if no middleware drain)\n})\n\napp.use(evlog({\n  \u002F\u002F no drain here - falls back to globalDrain from initLogger, with full request context\n}))\n",[426,2119,2120,2138,2156,2160,2168,2188,2203,2209,2213,2229,2234],{"__ignoreMap":444},[448,2121,2122,2124,2126,2128,2130,2132,2134,2136],{"class":450,"line":451},[448,2123,455],{"class":454},[448,2125,459],{"class":458},[448,2127,463],{"class":462},[448,2129,466],{"class":458},[448,2131,469],{"class":454},[448,2133,472],{"class":458},[448,2135,476],{"class":475},[448,2137,479],{"class":458},[448,2139,2140,2142,2144,2146,2148,2150,2152,2154],{"class":450,"line":482},[448,2141,455],{"class":454},[448,2143,459],{"class":458},[448,2145,489],{"class":462},[448,2147,466],{"class":458},[448,2149,469],{"class":454},[448,2151,472],{"class":458},[448,2153,498],{"class":475},[448,2155,479],{"class":458},[448,2157,2158],{"class":450,"line":503},[448,2159,507],{"emptyLinePlaceholder":506},[448,2161,2162,2164,2166],{"class":450,"line":510},[448,2163,428],{"class":513},[448,2165,516],{"class":462},[448,2167,519],{"class":458},[448,2169,2170,2172,2174,2176,2178,2180,2182,2184,2186],{"class":450,"line":522},[448,2171,542],{"class":525},[448,2173,529],{"class":458},[448,2175,459],{"class":458},[448,2177,549],{"class":525},[448,2179,529],{"class":458},[448,2181,472],{"class":458},[448,2183,556],{"class":475},[448,2185,559],{"class":458},[448,2187,577],{"class":458},[448,2189,2190,2192,2194,2196,2198,2200],{"class":450,"line":539},[448,2191,693],{"class":525},[448,2193,529],{"class":458},[448,2195,489],{"class":513},[448,2197,700],{"class":462},[448,2199,562],{"class":458},[448,2201,2202],{"class":1310}," \u002F\u002F fallback: used by singleton log API AND middleware (if no middleware drain)\n",[448,2204,2205,2207],{"class":450,"line":580},[448,2206,708],{"class":458},[448,2208,711],{"class":462},[448,2210,2211],{"class":450,"line":593},[448,2212,507],{"emptyLinePlaceholder":506},[448,2214,2215,2217,2219,2221,2223,2225,2227],{"class":450,"line":605},[448,2216,1610],{"class":462},[448,2218,1032],{"class":458},[448,2220,1615],{"class":513},[448,2222,516],{"class":462},[448,2224,476],{"class":513},[448,2226,516],{"class":462},[448,2228,519],{"class":458},[448,2230,2231],{"class":450,"line":617},[448,2232,2233],{"class":1310},"  \u002F\u002F no drain here - falls back to globalDrain from initLogger, with full request context\n",[448,2235,2236,2238],{"class":450,"line":634},[448,2237,708],{"class":458},[448,2239,1794],{"class":462},[421,2241,2243],{"id":2242},"framework-specific-options","Framework-Specific Options",[408,2245,2246],{},"Some frameworks have additional options beyond the shared config:",[940,2248,211],{"id":2249},"nuxt",[408,2251,2252,2253,2256,2257,2259],{},"The Nuxt module accepts all global options and middleware options in ",[426,2254,2255],{},"nuxt.config.ts"," under the ",[426,2258,476],{}," key, plus:",[713,2261,2262,2274],{},[716,2263,2264],{},[719,2265,2266,2268,2270,2272],{},[722,2267,724],{},[722,2269,727],{},[722,2271,730],{},[722,2273,733],{},[735,2275,2276,2294,2312,2331],{},[719,2277,2278,2283,2287,2291],{},[740,2279,2280],{},[426,2281,2282],{},"console",[740,2284,2285],{},[426,2286,749],{},[740,2288,2289],{},[426,2290,754],{},[740,2292,2293],{},"Enable\u002Fdisable browser console output (client-side only)",[719,2295,2296,2301,2305,2309],{},[740,2297,2298],{},[426,2299,2300],{},"transport.enabled",[740,2302,2303],{},[426,2304,749],{},[740,2306,2307],{},[426,2308,760],{},[740,2310,2311],{},"Send client logs to the server via API endpoint",[719,2313,2314,2319,2323,2328],{},[740,2315,2316],{},[426,2317,2318],{},"transport.endpoint",[740,2320,2321],{},[426,2322,1062],{},[740,2324,2325],{},[426,2326,2327],{},"'\u002Fapi\u002F_evlog\u002Fingest'",[740,2329,2330],{},"Custom transport endpoint",[719,2332,2333,2338,2343,2348],{},[740,2334,2335],{},[426,2336,2337],{},"transport.credentials",[740,2339,2340],{},[426,2341,2342],{},"RequestCredentials",[740,2344,2345],{},[426,2346,2347],{},"'same-origin'",[740,2349,2350,2351,2354],{},"Fetch credentials mode (",[426,2352,2353],{},"'include'"," for cross-origin endpoints)",[408,2356,2357,2358,1032],{},"See the full ",[893,2359,2361],{"href":2360},"\u002Fframeworks\u002Fnuxt#configuration","Nuxt configuration",[940,2363,226],{"id":2364},"nitro",[408,2366,2367,2368,1073,2370,1073,2372,1073,2374,1073,2376,1073,2378,1073,2380,2382,2383,2385,2386,2389],{},"The Nitro module accepts ",[426,2369,744],{},[426,2371,768],{},[426,2373,786],{},[426,2375,808],{},[426,2377,878],{},[426,2379,1976],{},[426,2381,1995],{},", and ",[426,2384,2013],{}," in ",[426,2387,2388],{},"nitro.config.ts",". Drain and enrichment are done via Nitro hooks.",[408,2391,2392,2393,1032],{},"See ",[893,2394,2396],{"href":2395},"\u002Fframeworks\u002Fnitro#drain--enrichers","Nitro drain & enrichers",[2398,2399,2400],"style",{},"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 .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .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}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 .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 .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}",{"title":444,"searchDepth":482,"depth":482,"links":2402},[2403,2410,2413],{"id":423,"depth":482,"text":2404,"children":2405},"Global Options (initLogger)",[2406,2408,2409],{"id":942,"depth":503,"text":2407},"minLevel vs sampling",{"id":1021,"depth":503,"text":1022},{"id":1174,"depth":503,"text":1175},{"id":1293,"depth":482,"text":1294,"children":2411},[2412],{"id":2104,"depth":503,"text":2105},{"id":2242,"depth":482,"text":2243,"children":2414},[2415,2416],{"id":2249,"depth":503,"text":211},{"id":2364,"depth":503,"text":226},"Complete reference for all evlog configuration options including global logger settings, middleware options, environment context, and framework-specific overrides.","md",[2420,2423],{"label":175,"icon":178,"to":176,"color":2421,"variant":2422},"neutral","subtle",{"label":2424,"icon":93,"to":305,"color":2421,"variant":2422},"Drain Adapters",{},{"icon":173},{"title":170,"description":2417},"zQJYXD22Tmkw_b4qCh8Ma2ztDhtu7OXPvcD-6PqFTws",[2430,2432],{"title":165,"path":166,"stem":167,"description":2431,"icon":168,"children":-1},"Understand the full lifecycle of an evlog event, from creation to drain. Covers all three modes (simple logging, wide events, request logging), sampling, enrichment, and delivery.",{"title":175,"path":176,"stem":177,"description":2433,"icon":178,"children":-1},"Control log volume with two-tier sampling. Head sampling drops noise by level, tail sampling rescues critical events based on outcome. Never miss errors, slow requests, or critical paths.",1778325970328]