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