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