[{"data":1,"prerenderedAt":2271},["ShallowReactive",2],{"navigation_docs":3,"-frameworks-standalone":308,"-frameworks-standalone-surround":2266},[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":310,"body":311,"description":2259,"extension":2260,"links":2261,"meta":2262,"navigation":2263,"path":195,"seo":2264,"stem":196,"__hash__":2265},"docs\u002F4.frameworks\u002F13.standalone.md","Standalone TypeScript",{"type":312,"value":313,"toc":2247},"minimark",[314,327,340,383,387,392,463,467,917,924,946,950,953,961,1065,1073,1206,1213,1216,1219,1543,1601,1605,1612,1952,1955,1965,1969,1974,2191,2197,2207,2211,2243],[315,316,317,318,322,323,326],"p",{},"For scripts, CLI tools, queue workers, cron jobs, and any TypeScript process that doesn't use a web framework, evlog provides ",[319,320,321],"code",{},"createLogger"," and ",[319,324,325],{},"createRequestLogger"," from the core package.",[328,329,331,332,335,336,339],"callout",{"color":330,"icon":286},"neutral","For scripts, queue workers, cron, and CLIs, this page is the reference. On Cloudflare Workers, prefer ",[333,334,189],"a",{"href":190}," (",[319,337,338],{},"createWorkersLogger",").",[341,342,345,348,370],"prompt",{":actions":343,"description":344,"icon":104},"[\"copy\",\"cursor\",\"windsurf\"]","Set up evlog in my TypeScript project",[315,346,347],{},"Set up evlog in my TypeScript project for scripts, workers, or CLI tools.",[349,350,351,355,358,361,364,367],"ul",{},[352,353,354],"li",{},"Install evlog: pnpm add evlog",[352,356,357],{},"Import initLogger and createLogger (or createRequestLogger) from 'evlog'",[352,359,360],{},"Call initLogger({ env: { service: 'my-script' } }) once at startup",[352,362,363],{},"Create a logger per logical operation with createLogger({ jobId, source })",[352,365,366],{},"Use log.set() to accumulate context as the operation progresses",[352,368,369],{},"Call log.emit() manually when the operation completes",[315,371,372,373,378,379],{},"Docs: ",[333,374,375],{"href":375,"rel":376},"https:\u002F\u002Fwww.evlog.dev\u002Fframeworks\u002Fstandalone",[377],"nofollow","\nAdapters: ",[333,380,381],{"href":381,"rel":382},"https:\u002F\u002Fwww.evlog.dev\u002Fadapters",[377],[384,385,20],"h2",{"id":386},"quick-start",[388,389,391],"h3",{"id":390},"_1-install","1. Install",[393,394,395,420,434,448],"code-group",{},[396,397,403],"pre",{"className":398,"code":399,"filename":400,"language":401,"meta":402,"style":402},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm add evlog\n","pnpm","bash","",[319,404,405],{"__ignoreMap":402},[406,407,410,413,417],"span",{"class":408,"line":409},"line",1,[406,411,400],{"class":412},"sBMFI",[406,414,416],{"class":415},"sfazB"," add",[406,418,419],{"class":415}," evlog\n",[396,421,424],{"className":398,"code":422,"filename":423,"language":401,"meta":402,"style":402},"bun add evlog\n","bun",[319,425,426],{"__ignoreMap":402},[406,427,428,430,432],{"class":408,"line":409},[406,429,423],{"class":412},[406,431,416],{"class":415},[406,433,419],{"class":415},[396,435,438],{"className":398,"code":436,"filename":437,"language":401,"meta":402,"style":402},"yarn add evlog\n","yarn",[319,439,440],{"__ignoreMap":402},[406,441,442,444,446],{"class":408,"line":409},[406,443,437],{"class":412},[406,445,416],{"class":415},[406,447,419],{"class":415},[396,449,452],{"className":398,"code":450,"filename":451,"language":401,"meta":402,"style":402},"npm install evlog\n","npm",[319,453,454],{"__ignoreMap":402},[406,455,456,458,461],{"class":408,"line":409},[406,457,451],{"class":412},[406,459,460],{"class":415}," install",[406,462,419],{"class":415},[388,464,466],{"id":465},"_2-initialize-and-create-loggers","2. Initialize and create loggers",[396,468,473],{"className":469,"code":470,"filename":471,"language":472,"meta":402,"style":402},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import type { DrainContext } from 'evlog'\nimport { initLogger, log, createLogger } from 'evlog'\nimport { createAxiomDrain } from 'evlog\u002Faxiom'\nimport { createDrainPipeline } from 'evlog\u002Fpipeline'\n\nconst pipeline = createDrainPipeline\u003CDrainContext>({ batch: { size: 10 } })\nconst drain = pipeline(createAxiomDrain())\n\ninitLogger({\n  env: { service: 'my-script', environment: 'production' },\n  drain,\n})\n\n\u002F\u002F Every log is automatically drained\nlog.info({ action: 'sync_started' })\n\nconst syncLog = createLogger({ jobId: 'sync-001', source: 'postgres', target: 's3' })\nsyncLog.set({ recordsSynced: 150 })\nsyncLog.emit() \u002F\u002F drained automatically\n\n\u002F\u002F Flush remaining events before exit\nawait drain.flush()\n","scripts\u002Fsync-job.ts","typescript",[319,474,475,507,538,559,580,587,643,664,669,680,720,729,737,742,749,781,786,846,873,889,894,900],{"__ignoreMap":402},[406,476,477,481,484,488,492,495,498,501,504],{"class":408,"line":409},[406,478,480],{"class":479},"s7zQu","import",[406,482,483],{"class":479}," type",[406,485,487],{"class":486},"sMK4o"," {",[406,489,491],{"class":490},"sTEyZ"," DrainContext",[406,493,494],{"class":486}," }",[406,496,497],{"class":479}," from",[406,499,500],{"class":486}," '",[406,502,503],{"class":415},"evlog",[406,505,506],{"class":486},"'\n",[406,508,510,512,514,517,520,523,525,528,530,532,534,536],{"class":408,"line":509},2,[406,511,480],{"class":479},[406,513,487],{"class":486},[406,515,516],{"class":490}," initLogger",[406,518,519],{"class":486},",",[406,521,522],{"class":490}," log",[406,524,519],{"class":486},[406,526,527],{"class":490}," createLogger",[406,529,494],{"class":486},[406,531,497],{"class":479},[406,533,500],{"class":486},[406,535,503],{"class":415},[406,537,506],{"class":486},[406,539,541,543,545,548,550,552,554,557],{"class":408,"line":540},3,[406,542,480],{"class":479},[406,544,487],{"class":486},[406,546,547],{"class":490}," createAxiomDrain",[406,549,494],{"class":486},[406,551,497],{"class":479},[406,553,500],{"class":486},[406,555,556],{"class":415},"evlog\u002Faxiom",[406,558,506],{"class":486},[406,560,562,564,566,569,571,573,575,578],{"class":408,"line":561},4,[406,563,480],{"class":479},[406,565,487],{"class":486},[406,567,568],{"class":490}," createDrainPipeline",[406,570,494],{"class":486},[406,572,497],{"class":479},[406,574,500],{"class":486},[406,576,577],{"class":415},"evlog\u002Fpipeline",[406,579,506],{"class":486},[406,581,583],{"class":408,"line":582},5,[406,584,586],{"emptyLinePlaceholder":585},true,"\n",[406,588,590,594,597,600,603,606,609,612,615,618,622,625,627,630,632,636,638,640],{"class":408,"line":589},6,[406,591,593],{"class":592},"spNyl","const",[406,595,596],{"class":490}," pipeline ",[406,598,599],{"class":486},"=",[406,601,568],{"class":602},"s2Zo4",[406,604,605],{"class":486},"\u003C",[406,607,608],{"class":412},"DrainContext",[406,610,611],{"class":486},">",[406,613,614],{"class":490},"(",[406,616,617],{"class":486},"{",[406,619,621],{"class":620},"swJcz"," batch",[406,623,624],{"class":486},":",[406,626,487],{"class":486},[406,628,629],{"class":620}," size",[406,631,624],{"class":486},[406,633,635],{"class":634},"sbssI"," 10",[406,637,494],{"class":486},[406,639,494],{"class":486},[406,641,642],{"class":490},")\n",[406,644,646,648,651,653,656,658,661],{"class":408,"line":645},7,[406,647,593],{"class":592},[406,649,650],{"class":490}," drain ",[406,652,599],{"class":486},[406,654,655],{"class":602}," pipeline",[406,657,614],{"class":490},[406,659,660],{"class":602},"createAxiomDrain",[406,662,663],{"class":490},"())\n",[406,665,667],{"class":408,"line":666},8,[406,668,586],{"emptyLinePlaceholder":585},[406,670,672,675,677],{"class":408,"line":671},9,[406,673,674],{"class":602},"initLogger",[406,676,614],{"class":490},[406,678,679],{"class":486},"{\n",[406,681,683,686,688,690,693,695,697,700,703,705,708,710,712,715,717],{"class":408,"line":682},10,[406,684,685],{"class":620},"  env",[406,687,624],{"class":486},[406,689,487],{"class":486},[406,691,692],{"class":620}," service",[406,694,624],{"class":486},[406,696,500],{"class":486},[406,698,699],{"class":415},"my-script",[406,701,702],{"class":486},"'",[406,704,519],{"class":486},[406,706,707],{"class":620}," environment",[406,709,624],{"class":486},[406,711,500],{"class":486},[406,713,714],{"class":415},"production",[406,716,702],{"class":486},[406,718,719],{"class":486}," },\n",[406,721,723,726],{"class":408,"line":722},11,[406,724,725],{"class":490},"  drain",[406,727,728],{"class":486},",\n",[406,730,732,735],{"class":408,"line":731},12,[406,733,734],{"class":486},"}",[406,736,642],{"class":490},[406,738,740],{"class":408,"line":739},13,[406,741,586],{"emptyLinePlaceholder":585},[406,743,745],{"class":408,"line":744},14,[406,746,748],{"class":747},"sHwdD","\u002F\u002F Every log is automatically drained\n",[406,750,752,755,758,761,763,765,768,770,772,775,777,779],{"class":408,"line":751},15,[406,753,754],{"class":490},"log",[406,756,757],{"class":486},".",[406,759,760],{"class":602},"info",[406,762,614],{"class":490},[406,764,617],{"class":486},[406,766,767],{"class":620}," action",[406,769,624],{"class":486},[406,771,500],{"class":486},[406,773,774],{"class":415},"sync_started",[406,776,702],{"class":486},[406,778,494],{"class":486},[406,780,642],{"class":490},[406,782,784],{"class":408,"line":783},16,[406,785,586],{"emptyLinePlaceholder":585},[406,787,789,791,794,796,798,800,802,805,807,809,812,814,816,819,821,823,826,828,830,833,835,837,840,842,844],{"class":408,"line":788},17,[406,790,593],{"class":592},[406,792,793],{"class":490}," syncLog ",[406,795,599],{"class":486},[406,797,527],{"class":602},[406,799,614],{"class":490},[406,801,617],{"class":486},[406,803,804],{"class":620}," jobId",[406,806,624],{"class":486},[406,808,500],{"class":486},[406,810,811],{"class":415},"sync-001",[406,813,702],{"class":486},[406,815,519],{"class":486},[406,817,818],{"class":620}," source",[406,820,624],{"class":486},[406,822,500],{"class":486},[406,824,825],{"class":415},"postgres",[406,827,702],{"class":486},[406,829,519],{"class":486},[406,831,832],{"class":620}," target",[406,834,624],{"class":486},[406,836,500],{"class":486},[406,838,839],{"class":415},"s3",[406,841,702],{"class":486},[406,843,494],{"class":486},[406,845,642],{"class":490},[406,847,849,852,854,857,859,861,864,866,869,871],{"class":408,"line":848},18,[406,850,851],{"class":490},"syncLog",[406,853,757],{"class":486},[406,855,856],{"class":602},"set",[406,858,614],{"class":490},[406,860,617],{"class":486},[406,862,863],{"class":620}," recordsSynced",[406,865,624],{"class":486},[406,867,868],{"class":634}," 150",[406,870,494],{"class":486},[406,872,642],{"class":490},[406,874,876,878,880,883,886],{"class":408,"line":875},19,[406,877,851],{"class":490},[406,879,757],{"class":486},[406,881,882],{"class":602},"emit",[406,884,885],{"class":490},"() ",[406,887,888],{"class":747},"\u002F\u002F drained automatically\n",[406,890,892],{"class":408,"line":891},20,[406,893,586],{"emptyLinePlaceholder":585},[406,895,897],{"class":408,"line":896},21,[406,898,899],{"class":747},"\u002F\u002F Flush remaining events before exit\n",[406,901,903,906,909,911,914],{"class":408,"line":902},22,[406,904,905],{"class":479},"await",[406,907,908],{"class":490}," drain",[406,910,757],{"class":486},[406,912,913],{"class":602},"flush",[406,915,916],{"class":490},"()\n",[328,918,919,920,923],{"color":760,"icon":13},"Always call ",[319,921,922],{},"drain.flush()"," before the process exits to ensure all buffered events are sent.",[328,925,926,930,931,937,938,941,942,945],{"color":760,"icon":118},[927,928,929],"strong",{},"Using vite-node?"," The ",[333,932,933,936],{"href":116},[319,934,935],{},"evlog\u002Fvite"," plugin"," replaces the ",[319,939,940],{},"initLogger()"," call with compile-time auto-initialization, strips ",[319,943,944],{},"log.debug()"," from production builds, and injects source locations.",[384,947,949],{"id":948},"createlogger-vs-createrequestlogger","createLogger vs createRequestLogger",[315,951,952],{},"evlog provides two manual logger constructors:",[315,954,955,960],{},[927,956,957],{},[319,958,959],{},"createLogger(context)"," - For non-HTTP contexts (scripts, CLI, queues):",[396,962,965],{"className":469,"code":963,"filename":964,"language":472,"meta":402,"style":402},"import { createLogger } from 'evlog'\n\nconst log = createLogger({ jobId: 'migrate-001', source: 'postgres' })\nlog.set({ recordsProcessed: 500 })\nlog.emit()\n","scripts\u002Fjob.ts",[319,966,967,985,989,1031,1055],{"__ignoreMap":402},[406,968,969,971,973,975,977,979,981,983],{"class":408,"line":409},[406,970,480],{"class":479},[406,972,487],{"class":486},[406,974,527],{"class":490},[406,976,494],{"class":486},[406,978,497],{"class":479},[406,980,500],{"class":486},[406,982,503],{"class":415},[406,984,506],{"class":486},[406,986,987],{"class":408,"line":509},[406,988,586],{"emptyLinePlaceholder":585},[406,990,991,993,996,998,1000,1002,1004,1006,1008,1010,1013,1015,1017,1019,1021,1023,1025,1027,1029],{"class":408,"line":540},[406,992,593],{"class":592},[406,994,995],{"class":490}," log ",[406,997,599],{"class":486},[406,999,527],{"class":602},[406,1001,614],{"class":490},[406,1003,617],{"class":486},[406,1005,804],{"class":620},[406,1007,624],{"class":486},[406,1009,500],{"class":486},[406,1011,1012],{"class":415},"migrate-001",[406,1014,702],{"class":486},[406,1016,519],{"class":486},[406,1018,818],{"class":620},[406,1020,624],{"class":486},[406,1022,500],{"class":486},[406,1024,825],{"class":415},[406,1026,702],{"class":486},[406,1028,494],{"class":486},[406,1030,642],{"class":490},[406,1032,1033,1035,1037,1039,1041,1043,1046,1048,1051,1053],{"class":408,"line":561},[406,1034,754],{"class":490},[406,1036,757],{"class":486},[406,1038,856],{"class":602},[406,1040,614],{"class":490},[406,1042,617],{"class":486},[406,1044,1045],{"class":620}," recordsProcessed",[406,1047,624],{"class":486},[406,1049,1050],{"class":634}," 500",[406,1052,494],{"class":486},[406,1054,642],{"class":490},[406,1056,1057,1059,1061,1063],{"class":408,"line":582},[406,1058,754],{"class":490},[406,1060,757],{"class":486},[406,1062,882],{"class":602},[406,1064,916],{"class":490},[315,1066,1067,1072],{},[927,1068,1069],{},[319,1070,1071],{},"createRequestLogger(requestMeta)"," - For HTTP-like contexts where you want method\u002Fpath\u002Fstatus tracking:",[396,1074,1077],{"className":469,"code":1075,"filename":1076,"language":472,"meta":402,"style":402},"import { createRequestLogger } from 'evlog'\n\nconst log = createRequestLogger({\n  method: 'POST',\n  path: '\u002Fwebhook\u002Fstripe',\n})\nlog.set({ event: 'invoice.paid', customerId: 'cus_123' })\nlog.emit()\n","scripts\u002Fwebhook-handler.ts",[319,1078,1079,1098,1102,1116,1132,1148,1154,1196],{"__ignoreMap":402},[406,1080,1081,1083,1085,1088,1090,1092,1094,1096],{"class":408,"line":409},[406,1082,480],{"class":479},[406,1084,487],{"class":486},[406,1086,1087],{"class":490}," createRequestLogger",[406,1089,494],{"class":486},[406,1091,497],{"class":479},[406,1093,500],{"class":486},[406,1095,503],{"class":415},[406,1097,506],{"class":486},[406,1099,1100],{"class":408,"line":509},[406,1101,586],{"emptyLinePlaceholder":585},[406,1103,1104,1106,1108,1110,1112,1114],{"class":408,"line":540},[406,1105,593],{"class":592},[406,1107,995],{"class":490},[406,1109,599],{"class":486},[406,1111,1087],{"class":602},[406,1113,614],{"class":490},[406,1115,679],{"class":486},[406,1117,1118,1121,1123,1125,1128,1130],{"class":408,"line":561},[406,1119,1120],{"class":620},"  method",[406,1122,624],{"class":486},[406,1124,500],{"class":486},[406,1126,1127],{"class":415},"POST",[406,1129,702],{"class":486},[406,1131,728],{"class":486},[406,1133,1134,1137,1139,1141,1144,1146],{"class":408,"line":582},[406,1135,1136],{"class":620},"  path",[406,1138,624],{"class":486},[406,1140,500],{"class":486},[406,1142,1143],{"class":415},"\u002Fwebhook\u002Fstripe",[406,1145,702],{"class":486},[406,1147,728],{"class":486},[406,1149,1150,1152],{"class":408,"line":589},[406,1151,734],{"class":486},[406,1153,642],{"class":490},[406,1155,1156,1158,1160,1162,1164,1166,1169,1171,1173,1176,1178,1180,1183,1185,1187,1190,1192,1194],{"class":408,"line":645},[406,1157,754],{"class":490},[406,1159,757],{"class":486},[406,1161,856],{"class":602},[406,1163,614],{"class":490},[406,1165,617],{"class":486},[406,1167,1168],{"class":620}," event",[406,1170,624],{"class":486},[406,1172,500],{"class":486},[406,1174,1175],{"class":415},"invoice.paid",[406,1177,702],{"class":486},[406,1179,519],{"class":486},[406,1181,1182],{"class":620}," customerId",[406,1184,624],{"class":486},[406,1186,500],{"class":486},[406,1188,1189],{"class":415},"cus_123",[406,1191,702],{"class":486},[406,1193,494],{"class":486},[406,1195,642],{"class":490},[406,1197,1198,1200,1202,1204],{"class":408,"line":666},[406,1199,754],{"class":490},[406,1201,757],{"class":486},[406,1203,882],{"class":602},[406,1205,916],{"class":490},[315,1207,1208,1209,1212],{},"Both require manual ",[319,1210,1211],{},"log.emit()"," calls since there is no automatic lifecycle to hook into.",[384,1214,51],{"id":1215},"wide-events",[315,1217,1218],{},"Build up context progressively, then emit:",[396,1220,1223],{"className":469,"code":1221,"filename":1222,"language":472,"meta":402,"style":402},"import { initLogger, createLogger } from 'evlog'\n\ninitLogger({\n  env: { service: 'migrate' },\n})\n\nconst log = createLogger({ task: 'user-migration' })\n\nconst users = await db.query('SELECT * FROM legacy_users')\nlog.set({ found: users.length })\n\nlet migrated = 0\nfor (const user of users) {\n  await newDb.upsert({ id: user.id, email: user.email, plan: user.plan })\n  migrated++\n}\n\nlog.set({ migrated, status: 'complete' })\nlog.emit()\n","scripts\u002Fmigrate-users.ts",[319,1224,1225,1247,1251,1259,1280,1286,1290,1320,1324,1355,1384,1388,1401,1421,1483,1491,1496,1500,1533],{"__ignoreMap":402},[406,1226,1227,1229,1231,1233,1235,1237,1239,1241,1243,1245],{"class":408,"line":409},[406,1228,480],{"class":479},[406,1230,487],{"class":486},[406,1232,516],{"class":490},[406,1234,519],{"class":486},[406,1236,527],{"class":490},[406,1238,494],{"class":486},[406,1240,497],{"class":479},[406,1242,500],{"class":486},[406,1244,503],{"class":415},[406,1246,506],{"class":486},[406,1248,1249],{"class":408,"line":509},[406,1250,586],{"emptyLinePlaceholder":585},[406,1252,1253,1255,1257],{"class":408,"line":540},[406,1254,674],{"class":602},[406,1256,614],{"class":490},[406,1258,679],{"class":486},[406,1260,1261,1263,1265,1267,1269,1271,1273,1276,1278],{"class":408,"line":561},[406,1262,685],{"class":620},[406,1264,624],{"class":486},[406,1266,487],{"class":486},[406,1268,692],{"class":620},[406,1270,624],{"class":486},[406,1272,500],{"class":486},[406,1274,1275],{"class":415},"migrate",[406,1277,702],{"class":486},[406,1279,719],{"class":486},[406,1281,1282,1284],{"class":408,"line":582},[406,1283,734],{"class":486},[406,1285,642],{"class":490},[406,1287,1288],{"class":408,"line":589},[406,1289,586],{"emptyLinePlaceholder":585},[406,1291,1292,1294,1296,1298,1300,1302,1304,1307,1309,1311,1314,1316,1318],{"class":408,"line":645},[406,1293,593],{"class":592},[406,1295,995],{"class":490},[406,1297,599],{"class":486},[406,1299,527],{"class":602},[406,1301,614],{"class":490},[406,1303,617],{"class":486},[406,1305,1306],{"class":620}," task",[406,1308,624],{"class":486},[406,1310,500],{"class":486},[406,1312,1313],{"class":415},"user-migration",[406,1315,702],{"class":486},[406,1317,494],{"class":486},[406,1319,642],{"class":490},[406,1321,1322],{"class":408,"line":666},[406,1323,586],{"emptyLinePlaceholder":585},[406,1325,1326,1328,1331,1333,1336,1339,1341,1344,1346,1348,1351,1353],{"class":408,"line":671},[406,1327,593],{"class":592},[406,1329,1330],{"class":490}," users ",[406,1332,599],{"class":486},[406,1334,1335],{"class":479}," await",[406,1337,1338],{"class":490}," db",[406,1340,757],{"class":486},[406,1342,1343],{"class":602},"query",[406,1345,614],{"class":490},[406,1347,702],{"class":486},[406,1349,1350],{"class":415},"SELECT * FROM legacy_users",[406,1352,702],{"class":486},[406,1354,642],{"class":490},[406,1356,1357,1359,1361,1363,1365,1367,1370,1372,1375,1377,1380,1382],{"class":408,"line":682},[406,1358,754],{"class":490},[406,1360,757],{"class":486},[406,1362,856],{"class":602},[406,1364,614],{"class":490},[406,1366,617],{"class":486},[406,1368,1369],{"class":620}," found",[406,1371,624],{"class":486},[406,1373,1374],{"class":490}," users",[406,1376,757],{"class":486},[406,1378,1379],{"class":490},"length ",[406,1381,734],{"class":486},[406,1383,642],{"class":490},[406,1385,1386],{"class":408,"line":722},[406,1387,586],{"emptyLinePlaceholder":585},[406,1389,1390,1393,1396,1398],{"class":408,"line":731},[406,1391,1392],{"class":592},"let",[406,1394,1395],{"class":490}," migrated ",[406,1397,599],{"class":486},[406,1399,1400],{"class":634}," 0\n",[406,1402,1403,1406,1408,1410,1413,1416,1419],{"class":408,"line":739},[406,1404,1405],{"class":479},"for",[406,1407,335],{"class":490},[406,1409,593],{"class":592},[406,1411,1412],{"class":490}," user ",[406,1414,1415],{"class":486},"of",[406,1417,1418],{"class":490}," users) ",[406,1420,679],{"class":486},[406,1422,1423,1426,1429,1431,1434,1436,1438,1441,1443,1446,1448,1451,1453,1456,1458,1460,1462,1465,1467,1470,1472,1474,1476,1479,1481],{"class":408,"line":744},[406,1424,1425],{"class":479},"  await",[406,1427,1428],{"class":490}," newDb",[406,1430,757],{"class":486},[406,1432,1433],{"class":602},"upsert",[406,1435,614],{"class":620},[406,1437,617],{"class":486},[406,1439,1440],{"class":620}," id",[406,1442,624],{"class":486},[406,1444,1445],{"class":490}," user",[406,1447,757],{"class":486},[406,1449,1450],{"class":490},"id",[406,1452,519],{"class":486},[406,1454,1455],{"class":620}," email",[406,1457,624],{"class":486},[406,1459,1445],{"class":490},[406,1461,757],{"class":486},[406,1463,1464],{"class":490},"email",[406,1466,519],{"class":486},[406,1468,1469],{"class":620}," plan",[406,1471,624],{"class":486},[406,1473,1445],{"class":490},[406,1475,757],{"class":486},[406,1477,1478],{"class":490},"plan",[406,1480,494],{"class":486},[406,1482,642],{"class":620},[406,1484,1485,1488],{"class":408,"line":751},[406,1486,1487],{"class":490},"  migrated",[406,1489,1490],{"class":486},"++\n",[406,1492,1493],{"class":408,"line":783},[406,1494,1495],{"class":486},"}\n",[406,1497,1498],{"class":408,"line":788},[406,1499,586],{"emptyLinePlaceholder":585},[406,1501,1502,1504,1506,1508,1510,1512,1515,1517,1520,1522,1524,1527,1529,1531],{"class":408,"line":848},[406,1503,754],{"class":490},[406,1505,757],{"class":486},[406,1507,856],{"class":602},[406,1509,614],{"class":490},[406,1511,617],{"class":486},[406,1513,1514],{"class":490}," migrated",[406,1516,519],{"class":486},[406,1518,1519],{"class":620}," status",[406,1521,624],{"class":486},[406,1523,500],{"class":486},[406,1525,1526],{"class":415},"complete",[406,1528,702],{"class":486},[406,1530,494],{"class":486},[406,1532,642],{"class":490},[406,1534,1535,1537,1539,1541],{"class":408,"line":875},[406,1536,754],{"class":490},[406,1538,757],{"class":486},[406,1540,882],{"class":602},[406,1542,916],{"class":490},[396,1544,1547],{"className":398,"code":1545,"filename":1546,"language":401,"meta":402,"style":402},"14:58:15 INFO [migrate] user-migration\n  ├─ migrated: 1250\n  ├─ found: 1250\n  ├─ status: complete\n  └─ task: user-migration\n","Terminal output",[319,1548,1549,1560,1571,1580,1590],{"__ignoreMap":402},[406,1550,1551,1554,1557],{"class":408,"line":409},[406,1552,1553],{"class":412},"14:58:15",[406,1555,1556],{"class":415}," INFO",[406,1558,1559],{"class":490}," [migrate] user-migration\n",[406,1561,1562,1565,1568],{"class":408,"line":509},[406,1563,1564],{"class":412},"  ├─",[406,1566,1567],{"class":415}," migrated:",[406,1569,1570],{"class":634}," 1250\n",[406,1572,1573,1575,1578],{"class":408,"line":540},[406,1574,1564],{"class":412},[406,1576,1577],{"class":415}," found:",[406,1579,1570],{"class":634},[406,1581,1582,1584,1587],{"class":408,"line":561},[406,1583,1564],{"class":412},[406,1585,1586],{"class":415}," status:",[406,1588,1589],{"class":415}," complete\n",[406,1591,1592,1595,1598],{"class":408,"line":582},[406,1593,1594],{"class":412},"  └─",[406,1596,1597],{"class":415}," task:",[406,1599,1600],{"class":415}," user-migration\n",[384,1602,1604],{"id":1603},"error-handling","Error Handling",[315,1606,1607,1608,1611],{},"Use ",[319,1609,1610],{},"createError"," for structured errors:",[396,1613,1615],{"className":469,"code":1614,"filename":471,"language":472,"meta":402,"style":402},"import { createError, parseError } from 'evlog'\n\ntry {\n  const result = await externalApi.sync()\n  if (!result.ok) {\n    throw createError({\n      message: 'Sync failed',\n      why: `API returned ${result.status}`,\n      fix: 'Check the API status page and retry',\n    })\n  }\n} catch (error) {\n  log.error(error instanceof Error ? error : new Error(String(error)))\n  log.emit()\n\n  const { message, why, fix } = parseError(error)\n  console.error(`${message}\\nWhy: ${why}\\nFix: ${fix}`)\n  process.exit(1)\n}\n",[319,1616,1617,1641,1645,1653,1676,1699,1710,1726,1754,1770,1777,1782,1794,1840,1850,1854,1885,1931,1948],{"__ignoreMap":402},[406,1618,1619,1621,1623,1626,1628,1631,1633,1635,1637,1639],{"class":408,"line":409},[406,1620,480],{"class":479},[406,1622,487],{"class":486},[406,1624,1625],{"class":490}," createError",[406,1627,519],{"class":486},[406,1629,1630],{"class":490}," parseError",[406,1632,494],{"class":486},[406,1634,497],{"class":479},[406,1636,500],{"class":486},[406,1638,503],{"class":415},[406,1640,506],{"class":486},[406,1642,1643],{"class":408,"line":509},[406,1644,586],{"emptyLinePlaceholder":585},[406,1646,1647,1650],{"class":408,"line":540},[406,1648,1649],{"class":479},"try",[406,1651,1652],{"class":486}," {\n",[406,1654,1655,1658,1661,1664,1666,1669,1671,1674],{"class":408,"line":561},[406,1656,1657],{"class":592},"  const",[406,1659,1660],{"class":490}," result",[406,1662,1663],{"class":486}," =",[406,1665,1335],{"class":479},[406,1667,1668],{"class":490}," externalApi",[406,1670,757],{"class":486},[406,1672,1673],{"class":602},"sync",[406,1675,916],{"class":620},[406,1677,1678,1681,1683,1686,1689,1691,1694,1697],{"class":408,"line":582},[406,1679,1680],{"class":479},"  if",[406,1682,335],{"class":620},[406,1684,1685],{"class":486},"!",[406,1687,1688],{"class":490},"result",[406,1690,757],{"class":486},[406,1692,1693],{"class":490},"ok",[406,1695,1696],{"class":620},") ",[406,1698,679],{"class":486},[406,1700,1701,1704,1706,1708],{"class":408,"line":589},[406,1702,1703],{"class":479},"    throw",[406,1705,1625],{"class":602},[406,1707,614],{"class":620},[406,1709,679],{"class":486},[406,1711,1712,1715,1717,1719,1722,1724],{"class":408,"line":645},[406,1713,1714],{"class":620},"      message",[406,1716,624],{"class":486},[406,1718,500],{"class":486},[406,1720,1721],{"class":415},"Sync failed",[406,1723,702],{"class":486},[406,1725,728],{"class":486},[406,1727,1728,1731,1733,1736,1739,1742,1744,1746,1749,1752],{"class":408,"line":666},[406,1729,1730],{"class":620},"      why",[406,1732,624],{"class":486},[406,1734,1735],{"class":486}," `",[406,1737,1738],{"class":415},"API returned ",[406,1740,1741],{"class":486},"${",[406,1743,1688],{"class":490},[406,1745,757],{"class":486},[406,1747,1748],{"class":490},"status",[406,1750,1751],{"class":486},"}`",[406,1753,728],{"class":486},[406,1755,1756,1759,1761,1763,1766,1768],{"class":408,"line":671},[406,1757,1758],{"class":620},"      fix",[406,1760,624],{"class":486},[406,1762,500],{"class":486},[406,1764,1765],{"class":415},"Check the API status page and retry",[406,1767,702],{"class":486},[406,1769,728],{"class":486},[406,1771,1772,1775],{"class":408,"line":682},[406,1773,1774],{"class":486},"    }",[406,1776,642],{"class":620},[406,1778,1779],{"class":408,"line":722},[406,1780,1781],{"class":486},"  }\n",[406,1783,1784,1786,1789,1792],{"class":408,"line":731},[406,1785,734],{"class":486},[406,1787,1788],{"class":479}," catch",[406,1790,1791],{"class":490}," (error) ",[406,1793,679],{"class":486},[406,1795,1796,1799,1801,1804,1806,1808,1811,1814,1817,1820,1823,1826,1828,1830,1833,1835,1837],{"class":408,"line":739},[406,1797,1798],{"class":490},"  log",[406,1800,757],{"class":486},[406,1802,1803],{"class":602},"error",[406,1805,614],{"class":620},[406,1807,1803],{"class":490},[406,1809,1810],{"class":486}," instanceof",[406,1812,1813],{"class":412}," Error",[406,1815,1816],{"class":486}," ?",[406,1818,1819],{"class":490}," error",[406,1821,1822],{"class":486}," :",[406,1824,1825],{"class":486}," new",[406,1827,1813],{"class":602},[406,1829,614],{"class":620},[406,1831,1832],{"class":602},"String",[406,1834,614],{"class":620},[406,1836,1803],{"class":490},[406,1838,1839],{"class":620},")))\n",[406,1841,1842,1844,1846,1848],{"class":408,"line":744},[406,1843,1798],{"class":490},[406,1845,757],{"class":486},[406,1847,882],{"class":602},[406,1849,916],{"class":620},[406,1851,1852],{"class":408,"line":751},[406,1853,586],{"emptyLinePlaceholder":585},[406,1855,1856,1858,1860,1863,1865,1868,1870,1873,1875,1877,1879,1881,1883],{"class":408,"line":783},[406,1857,1657],{"class":592},[406,1859,487],{"class":486},[406,1861,1862],{"class":490}," message",[406,1864,519],{"class":486},[406,1866,1867],{"class":490}," why",[406,1869,519],{"class":486},[406,1871,1872],{"class":490}," fix",[406,1874,494],{"class":486},[406,1876,1663],{"class":486},[406,1878,1630],{"class":602},[406,1880,614],{"class":620},[406,1882,1803],{"class":490},[406,1884,642],{"class":620},[406,1886,1887,1890,1892,1894,1896,1899,1902,1904,1907,1910,1912,1915,1917,1919,1922,1924,1927,1929],{"class":408,"line":788},[406,1888,1889],{"class":490},"  console",[406,1891,757],{"class":486},[406,1893,1803],{"class":602},[406,1895,614],{"class":620},[406,1897,1898],{"class":486},"`${",[406,1900,1901],{"class":490},"message",[406,1903,734],{"class":486},[406,1905,1906],{"class":490},"\\n",[406,1908,1909],{"class":415},"Why: ",[406,1911,1741],{"class":486},[406,1913,1914],{"class":490},"why",[406,1916,734],{"class":486},[406,1918,1906],{"class":490},[406,1920,1921],{"class":415},"Fix: ",[406,1923,1741],{"class":486},[406,1925,1926],{"class":490},"fix",[406,1928,1751],{"class":486},[406,1930,642],{"class":620},[406,1932,1933,1936,1938,1941,1943,1946],{"class":408,"line":848},[406,1934,1935],{"class":490},"  process",[406,1937,757],{"class":486},[406,1939,1940],{"class":602},"exit",[406,1942,614],{"class":620},[406,1944,1945],{"class":634},"1",[406,1947,642],{"class":620},[406,1949,1950],{"class":408,"line":875},[406,1951,1495],{"class":486},[384,1953,91],{"id":1954},"configuration",[315,1956,1957,1958,1961,1962,1964],{},"See the ",[333,1959,1960],{"href":92},"Configuration reference"," for all available options (",[319,1963,674],{},", middleware options, sampling, silent mode, etc.).",[384,1966,1968],{"id":1967},"drain-enrichers","Drain & Enrichers",[315,1970,1971,1972,624],{},"Configure drain in ",[319,1973,674],{},[396,1975,1978],{"className":469,"code":1976,"filename":1977,"language":472,"meta":402,"style":402},"import type { DrainContext } from 'evlog'\nimport { initLogger } from 'evlog'\nimport { createAxiomDrain } from 'evlog\u002Faxiom'\nimport { createDrainPipeline } from 'evlog\u002Fpipeline'\n\nconst pipeline = createDrainPipeline\u003CDrainContext>({\n  batch: { size: 50, intervalMs: 5000 },\n  retry: { maxAttempts: 3 },\n})\nconst drain = pipeline(createAxiomDrain())\n\ninitLogger({\n  env: { service: 'my-script' },\n  drain,\n})\n","scripts\u002Finit-logger.ts",[319,1979,1980,2000,2018,2036,2054,2058,2078,2106,2125,2131,2147,2151,2159,2179,2185],{"__ignoreMap":402},[406,1981,1982,1984,1986,1988,1990,1992,1994,1996,1998],{"class":408,"line":409},[406,1983,480],{"class":479},[406,1985,483],{"class":479},[406,1987,487],{"class":486},[406,1989,491],{"class":490},[406,1991,494],{"class":486},[406,1993,497],{"class":479},[406,1995,500],{"class":486},[406,1997,503],{"class":415},[406,1999,506],{"class":486},[406,2001,2002,2004,2006,2008,2010,2012,2014,2016],{"class":408,"line":509},[406,2003,480],{"class":479},[406,2005,487],{"class":486},[406,2007,516],{"class":490},[406,2009,494],{"class":486},[406,2011,497],{"class":479},[406,2013,500],{"class":486},[406,2015,503],{"class":415},[406,2017,506],{"class":486},[406,2019,2020,2022,2024,2026,2028,2030,2032,2034],{"class":408,"line":540},[406,2021,480],{"class":479},[406,2023,487],{"class":486},[406,2025,547],{"class":490},[406,2027,494],{"class":486},[406,2029,497],{"class":479},[406,2031,500],{"class":486},[406,2033,556],{"class":415},[406,2035,506],{"class":486},[406,2037,2038,2040,2042,2044,2046,2048,2050,2052],{"class":408,"line":561},[406,2039,480],{"class":479},[406,2041,487],{"class":486},[406,2043,568],{"class":490},[406,2045,494],{"class":486},[406,2047,497],{"class":479},[406,2049,500],{"class":486},[406,2051,577],{"class":415},[406,2053,506],{"class":486},[406,2055,2056],{"class":408,"line":582},[406,2057,586],{"emptyLinePlaceholder":585},[406,2059,2060,2062,2064,2066,2068,2070,2072,2074,2076],{"class":408,"line":589},[406,2061,593],{"class":592},[406,2063,596],{"class":490},[406,2065,599],{"class":486},[406,2067,568],{"class":602},[406,2069,605],{"class":486},[406,2071,608],{"class":412},[406,2073,611],{"class":486},[406,2075,614],{"class":490},[406,2077,679],{"class":486},[406,2079,2080,2083,2085,2087,2089,2091,2094,2096,2099,2101,2104],{"class":408,"line":645},[406,2081,2082],{"class":620},"  batch",[406,2084,624],{"class":486},[406,2086,487],{"class":486},[406,2088,629],{"class":620},[406,2090,624],{"class":486},[406,2092,2093],{"class":634}," 50",[406,2095,519],{"class":486},[406,2097,2098],{"class":620}," intervalMs",[406,2100,624],{"class":486},[406,2102,2103],{"class":634}," 5000",[406,2105,719],{"class":486},[406,2107,2108,2111,2113,2115,2118,2120,2123],{"class":408,"line":666},[406,2109,2110],{"class":620},"  retry",[406,2112,624],{"class":486},[406,2114,487],{"class":486},[406,2116,2117],{"class":620}," maxAttempts",[406,2119,624],{"class":486},[406,2121,2122],{"class":634}," 3",[406,2124,719],{"class":486},[406,2126,2127,2129],{"class":408,"line":671},[406,2128,734],{"class":486},[406,2130,642],{"class":490},[406,2132,2133,2135,2137,2139,2141,2143,2145],{"class":408,"line":682},[406,2134,593],{"class":592},[406,2136,650],{"class":490},[406,2138,599],{"class":486},[406,2140,655],{"class":602},[406,2142,614],{"class":490},[406,2144,660],{"class":602},[406,2146,663],{"class":490},[406,2148,2149],{"class":408,"line":722},[406,2150,586],{"emptyLinePlaceholder":585},[406,2152,2153,2155,2157],{"class":408,"line":731},[406,2154,674],{"class":602},[406,2156,614],{"class":490},[406,2158,679],{"class":486},[406,2160,2161,2163,2165,2167,2169,2171,2173,2175,2177],{"class":408,"line":739},[406,2162,685],{"class":620},[406,2164,624],{"class":486},[406,2166,487],{"class":486},[406,2168,692],{"class":620},[406,2170,624],{"class":486},[406,2172,500],{"class":486},[406,2174,699],{"class":415},[406,2176,702],{"class":486},[406,2178,719],{"class":486},[406,2180,2181,2183],{"class":408,"line":744},[406,2182,725],{"class":490},[406,2184,728],{"class":486},[406,2186,2187,2189],{"class":408,"line":751},[406,2188,734],{"class":486},[406,2190,642],{"class":490},[328,2192,1957,2193,2196],{"color":760,"icon":13},[333,2194,213],{"href":2195},"\u002Fadapters\u002Foverview"," docs for all available drain adapters (Axiom, OTLP, PostHog, Sentry, Better Stack).",[328,2198,2200,2201,2206],{"color":330,"icon":2199},"i-lucide-arrow-right","See the full ",[333,2202,2205],{"href":2203,"rel":2204},"https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog\u002Ftree\u002Fmain\u002Fexamples\u002Fbun-script",[377],"bun-script example"," for a complete working script.",[384,2208,2210],{"id":2209},"next-steps","Next Steps",[349,2212,2213,2218,2223,2228],{},[352,2214,2215,2217],{},[333,2216,51],{"href":52},": Design comprehensive events with context layering",[352,2219,2220,2222],{},[333,2221,213],{"href":2195},": Send logs to Axiom, Sentry, PostHog, and more",[352,2224,2225,2227],{},[333,2226,96],{"href":97},": Control log volume with head and tail sampling",[352,2229,2230,2232,2233,2235,2236,2238,2239,2242],{},[333,2231,56],{"href":57},": Throw errors with ",[319,2234,1914],{},", ",[319,2237,1926],{},", and ",[319,2240,2241],{},"link"," fields",[2244,2245,2246],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}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 .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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}",{"title":402,"searchDepth":509,"depth":509,"links":2248},[2249,2253,2254,2255,2256,2257,2258],{"id":386,"depth":509,"text":20,"children":2250},[2251,2252],{"id":390,"depth":540,"text":391},{"id":465,"depth":540,"text":466},{"id":948,"depth":509,"text":949},{"id":1215,"depth":509,"text":51},{"id":1603,"depth":509,"text":1604},{"id":1954,"depth":509,"text":91},{"id":1967,"depth":509,"text":1968},{"id":2209,"depth":509,"text":2210},"Use evlog in standalone TypeScript scripts, CLI tools, queues, cron jobs, and any TypeScript process.","md",null,{},{"title":194,"icon":104},{"title":310,"description":2259},"T_ry9G5iw54j1Rz3a6ghk_H_ohvtLt2rZ2QFuMkiGMM",[2267,2269],{"title":189,"path":190,"stem":191,"description":2268,"icon":192,"children":-1},"Wide events, structured errors, and logging in Cloudflare Workers and Durable Objects.",{"title":198,"path":199,"stem":200,"description":2270,"icon":201,"children":-1},"Wide events and structured errors in Astro server middleware.",1777667166721]