[{"data":1,"prerenderedAt":1340},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-introduction":301,"-getting-started-introduction-surround":1336},[4,30,75,119,207,271,287],{"title":5,"path":6,"stem":7,"children":8,"page":29},"Getting Started","\u002Fgetting-started","1.getting-started",[9,14,19,24],{"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",false,{"title":31,"path":32,"stem":33,"children":34,"page":29},"Logging","\u002Flogging","2.logging",[35,40,45,50,55,60,65,70],{"title":36,"path":37,"stem":38,"icon":39},"Overview","\u002Flogging\u002Foverview","2.logging\u002F0.overview","i-lucide-list",{"title":41,"path":42,"stem":43,"icon":44},"Simple Logging","\u002Flogging\u002Fsimple-logging","2.logging\u002F1.simple-logging","i-lucide-terminal",{"title":46,"path":47,"stem":48,"icon":49},"Wide Events","\u002Flogging\u002Fwide-events","2.logging\u002F2.wide-events","i-lucide-layers",{"title":51,"path":52,"stem":53,"icon":54},"Structured Errors","\u002Flogging\u002Fstructured-errors","2.logging\u002F3.structured-errors","i-lucide-shield-alert",{"title":56,"path":57,"stem":58,"icon":59},"Client Logging","\u002Flogging\u002Fclient-logging","2.logging\u002F4.client-logging","i-lucide-monitor",{"title":61,"path":62,"stem":63,"icon":64},"AI SDK Integration","\u002Flogging\u002Fai-sdk","2.logging\u002F5.ai-sdk","i-simple-icons-vercel",{"title":66,"path":67,"stem":68,"icon":69},"Better Auth Integration","\u002Flogging\u002Fbetter-auth","2.logging\u002F6.better-auth","i-simple-icons-betterauth",{"title":71,"path":72,"stem":73,"icon":74},"Audit Logs","\u002Flogging\u002Faudit","2.logging\u002F7.audit","i-lucide-shield-check",{"title":76,"path":77,"stem":78,"children":79,"page":29},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[80,85,90,95,100,104,109,114],{"title":81,"path":82,"stem":83,"icon":84},"Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":86,"path":87,"stem":88,"icon":89},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F1.configuration","i-lucide-settings",{"title":91,"path":92,"stem":93,"icon":94},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F2.sampling","i-lucide-filter",{"title":96,"path":97,"stem":98,"icon":99},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F3.typed-fields","i-simple-icons-typescript",{"title":101,"path":102,"stem":103,"icon":74},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F4.best-practices",{"title":105,"path":106,"stem":107,"icon":108},"Performance","\u002Fcore-concepts\u002Fperformance","3.core-concepts\u002F5.performance","i-lucide-gauge",{"title":110,"path":111,"stem":112,"icon":113},"Vite Plugin","\u002Fcore-concepts\u002Fvite-plugin","3.core-concepts\u002F6.vite-plugin","i-custom-vite",{"title":115,"path":116,"stem":117,"icon":118},"Auto-Redaction","\u002Fcore-concepts\u002Fredaction","3.core-concepts\u002F7.redaction","i-lucide-eye-off",{"title":120,"path":121,"stem":122,"children":123,"page":29},"Frameworks","\u002Fframeworks","4.frameworks",[124,128,133,138,143,148,153,158,163,168,173,178,183,188,192,197,202],{"title":36,"path":125,"stem":126,"icon":127},"\u002Fframeworks\u002Foverview","4.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":129,"path":130,"stem":131,"icon":132},"Nuxt","\u002Fframeworks\u002Fnuxt","4.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":134,"path":135,"stem":136,"icon":137},"Next.js","\u002Fframeworks\u002Fnextjs","4.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":139,"path":140,"stem":141,"icon":142},"SvelteKit","\u002Fframeworks\u002Fsveltekit","4.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":144,"path":145,"stem":146,"icon":147},"Nitro","\u002Fframeworks\u002Fnitro","4.frameworks\u002F04.nitro","i-custom-nitro",{"title":149,"path":150,"stem":151,"icon":152},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","4.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":154,"path":155,"stem":156,"icon":157},"NestJS","\u002Fframeworks\u002Fnestjs","4.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":159,"path":160,"stem":161,"icon":162},"Express","\u002Fframeworks\u002Fexpress","4.frameworks\u002F07.express","i-simple-icons-express",{"title":164,"path":165,"stem":166,"icon":167},"Hono","\u002Fframeworks\u002Fhono","4.frameworks\u002F08.hono","i-simple-icons-hono",{"title":169,"path":170,"stem":171,"icon":172},"Fastify","\u002Fframeworks\u002Ffastify","4.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":174,"path":175,"stem":176,"icon":177},"Elysia","\u002Fframeworks\u002Felysia","4.frameworks\u002F10.elysia","i-custom-elysia",{"title":179,"path":180,"stem":181,"icon":182},"React Router","\u002Fframeworks\u002Freact-router","4.frameworks\u002F11.react-router","i-custom-reactrouter",{"title":184,"path":185,"stem":186,"icon":187},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","4.frameworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":189,"path":190,"stem":191,"icon":99},"Standalone","\u002Fframeworks\u002Fstandalone","4.frameworks\u002F13.standalone",{"title":193,"path":194,"stem":195,"icon":196},"Astro","\u002Fframeworks\u002Fastro","4.frameworks\u002F14.astro","i-simple-icons-astro",{"title":198,"path":199,"stem":200,"icon":201},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","4.frameworks\u002F15.custom-integration","i-lucide-puzzle",{"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,"children":211,"page":29},"Adapters","\u002Fadapters","5.adapters",[212,216,221,226,231,236,241,246,251,256,261,266],{"title":36,"path":213,"stem":214,"icon":215},"\u002Fadapters\u002Foverview","5.adapters\u002F1.overview","i-custom-plug",{"title":217,"path":218,"stem":219,"icon":220},"Custom Adapters","\u002Fadapters\u002Fcustom","5.adapters\u002F10.custom","i-lucide-code",{"title":222,"path":223,"stem":224,"icon":225},"Pipeline","\u002Fadapters\u002Fpipeline","5.adapters\u002F11.pipeline","i-lucide-workflow",{"title":227,"path":228,"stem":229,"icon":230},"HTTP","\u002Fadapters\u002Fhttp","5.adapters\u002F12.http","i-lucide-globe",{"title":232,"path":233,"stem":234,"icon":235},"Axiom","\u002Fadapters\u002Faxiom","5.adapters\u002F2.axiom","i-custom-axiom",{"title":237,"path":238,"stem":239,"icon":240},"OTLP","\u002Fadapters\u002Fotlp","5.adapters\u002F3.otlp","i-simple-icons-opentelemetry",{"title":242,"path":243,"stem":244,"icon":245},"PostHog","\u002Fadapters\u002Fposthog","5.adapters\u002F4.posthog","i-simple-icons-posthog",{"title":247,"path":248,"stem":249,"icon":250},"Sentry","\u002Fadapters\u002Fsentry","5.adapters\u002F5.sentry","i-simple-icons-sentry",{"title":252,"path":253,"stem":254,"icon":255},"Better Stack","\u002Fadapters\u002Fbetter-stack","5.adapters\u002F6.better-stack","i-simple-icons-betterstack",{"title":257,"path":258,"stem":259,"icon":260},"File System","\u002Fadapters\u002Ffs","5.adapters\u002F7.fs","i-lucide-hard-drive",{"title":262,"path":263,"stem":264,"icon":265},"Datadog","\u002Fadapters\u002Fdatadog","5.adapters\u002F8.datadog","i-simple-icons-datadog",{"title":267,"path":268,"stem":269,"icon":270},"HyperDX","\u002Fadapters\u002Fhyperdx","5.adapters\u002F9.hyperdx","i-custom-hyperdx",{"title":272,"path":273,"stem":274,"children":275,"page":29},"Enrichers","\u002Fenrichers","6.enrichers",[276,279,283],{"title":36,"path":277,"stem":278,"icon":28},"\u002Fenrichers\u002Foverview","6.enrichers\u002F1.overview",{"title":280,"path":281,"stem":282,"icon":201},"Built-in","\u002Fenrichers\u002Fbuilt-in","6.enrichers\u002F2.built-in",{"title":284,"path":285,"stem":286,"icon":220},"Custom","\u002Fenrichers\u002Fcustom","6.enrichers\u002F3.custom",{"title":288,"path":289,"stem":290,"children":291,"page":29},"NuxtHub","\u002Fnuxthub","7.nuxthub",[292,296],{"title":36,"path":293,"stem":294,"icon":295},"\u002Fnuxthub\u002Foverview","7.nuxthub\u002F1.overview","i-lucide-database",{"title":297,"path":298,"stem":299,"icon":300},"Retention","\u002Fnuxthub\u002Fretention","7.nuxthub\u002F2.retention","i-lucide-clock",{"id":302,"title":10,"body":303,"description":1321,"extension":1322,"links":1323,"meta":1332,"navigation":1333,"path":11,"seo":1334,"stem":12,"__hash__":1335},"docs\u002F1.getting-started\u002F1.introduction.md",{"type":304,"value":305,"toc":1311},"minimark",[306,323,340,345,348,353,377,381,384,388,394,537,540,543,966,969,972,986,1239,1243,1250,1275,1285,1289,1307],[307,308,309,313,314,318,319,322],"p",{},[310,311,312],"strong",{},"evlog"," is a structured logging library for TypeScript. It gives you simple one-liner logs, wide events that accumulate context over any operation, and structured errors that explain ",[315,316,317],"em",{},"why"," something failed and ",[315,320,321],{},"how"," to fix it.",[307,324,325,326,333,334,339],{},"Inspired by ",[327,328,332],"a",{"href":329,"rel":330},"https:\u002F\u002Floggingsucks.com\u002F",[331],"nofollow","Logging Sucks"," by ",[327,335,338],{"href":336,"rel":337},"https:\u002F\u002Fx.com\u002Fboristane",[331],"Boris Tane",".",[341,342,344],"h2",{"id":343},"philosophy","Philosophy",[307,346,347],{},"Traditional logging is broken. Your logs are scattered across dozens of files. Each request generates 10+ log lines. When something goes wrong, you're left grep-ing through noise hoping to find signal.",[307,349,350,352],{},[310,351,312],{}," takes a different approach:",[354,355,356,366,369,372],"card-group",{},[357,358,360,361,365],"card",{"icon":44,"title":359},"Structured Logging","Replace ",[362,363,364],"code",{},"console.log"," with typed, structured events that flow through a drain pipeline.",[357,367,368],{"icon":49,"title":46},"Accumulate context over any unit of work (a request, script, or job) and emit once.",[357,370,371],{"icon":54,"title":51},"Errors that explain why they occurred and how to fix them.",[357,373,376],{"icon":374,"title":375},"i-lucide-palette","Pretty for Dev","Human-readable in development, machine-parseable JSON in production.",[341,378,380],{"id":379},"three-ways-to-log","Three Ways to Log",[307,382,383],{},"evlog provides three APIs for different contexts. You can use all three in the same project.",[385,386,41],"h3",{"id":387},"simple-logging",[307,389,390,391,393],{},"Fire-and-forget structured logs. Replace ",[362,392,364],{},", consola, or pino:",[395,396,402],"pre",{"className":397,"code":398,"filename":399,"language":400,"meta":401,"style":401},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { log } from 'evlog'\n\nlog.info('auth', 'User logged in')\nlog.error({ action: 'payment', error: 'card_declined', userId: 42 })\n","src\u002Findex.ts","typescript","",[362,403,404,436,443,479],{"__ignoreMap":401},[405,406,409,413,417,421,424,427,430,433],"span",{"class":407,"line":408},"line",1,[405,410,412],{"class":411},"s7zQu","import",[405,414,416],{"class":415},"sMK4o"," {",[405,418,420],{"class":419},"sTEyZ"," log",[405,422,423],{"class":415}," }",[405,425,426],{"class":411}," from",[405,428,429],{"class":415}," '",[405,431,312],{"class":432},"sfazB",[405,434,435],{"class":415},"'\n",[405,437,439],{"class":407,"line":438},2,[405,440,442],{"emptyLinePlaceholder":441},true,"\n",[405,444,446,449,451,455,458,461,464,466,469,471,474,476],{"class":407,"line":445},3,[405,447,448],{"class":419},"log",[405,450,339],{"class":415},[405,452,454],{"class":453},"s2Zo4","info",[405,456,457],{"class":419},"(",[405,459,460],{"class":415},"'",[405,462,463],{"class":432},"auth",[405,465,460],{"class":415},[405,467,468],{"class":415},",",[405,470,429],{"class":415},[405,472,473],{"class":432},"User logged in",[405,475,460],{"class":415},[405,477,478],{"class":419},")\n",[405,480,482,484,486,489,491,494,498,501,503,506,508,510,513,515,517,520,522,524,527,529,533,535],{"class":407,"line":481},4,[405,483,448],{"class":419},[405,485,339],{"class":415},[405,487,488],{"class":453},"error",[405,490,457],{"class":419},[405,492,493],{"class":415},"{",[405,495,497],{"class":496},"swJcz"," action",[405,499,500],{"class":415},":",[405,502,429],{"class":415},[405,504,505],{"class":432},"payment",[405,507,460],{"class":415},[405,509,468],{"class":415},[405,511,512],{"class":496}," error",[405,514,500],{"class":415},[405,516,429],{"class":415},[405,518,519],{"class":432},"card_declined",[405,521,460],{"class":415},[405,523,468],{"class":415},[405,525,526],{"class":496}," userId",[405,528,500],{"class":415},[405,530,532],{"class":531},"sbssI"," 42",[405,534,423],{"class":415},[405,536,478],{"class":419},[385,538,46],{"id":539},"wide-events",[307,541,542],{},"Accumulate context progressively over any operation, then emit a single comprehensive event:",[544,545,546,679,809],"code-group",{},[395,547,550],{"className":397,"code":548,"filename":549,"language":400,"meta":401,"style":401},"import { createLogger } from 'evlog'\n\nconst log = createLogger({ jobId: 'sync-001', queue: 'emails' })\nlog.set({ batch: { size: 50, processed: 50 } })\nlog.emit()\n","scripts\u002Fsync-job.ts",[362,551,552,571,575,623,666],{"__ignoreMap":401},[405,553,554,556,558,561,563,565,567,569],{"class":407,"line":408},[405,555,412],{"class":411},[405,557,416],{"class":415},[405,559,560],{"class":419}," createLogger",[405,562,423],{"class":415},[405,564,426],{"class":411},[405,566,429],{"class":415},[405,568,312],{"class":432},[405,570,435],{"class":415},[405,572,573],{"class":407,"line":438},[405,574,442],{"emptyLinePlaceholder":441},[405,576,577,581,584,587,589,591,593,596,598,600,603,605,607,610,612,614,617,619,621],{"class":407,"line":445},[405,578,580],{"class":579},"spNyl","const",[405,582,583],{"class":419}," log ",[405,585,586],{"class":415},"=",[405,588,560],{"class":453},[405,590,457],{"class":419},[405,592,493],{"class":415},[405,594,595],{"class":496}," jobId",[405,597,500],{"class":415},[405,599,429],{"class":415},[405,601,602],{"class":432},"sync-001",[405,604,460],{"class":415},[405,606,468],{"class":415},[405,608,609],{"class":496}," queue",[405,611,500],{"class":415},[405,613,429],{"class":415},[405,615,616],{"class":432},"emails",[405,618,460],{"class":415},[405,620,423],{"class":415},[405,622,478],{"class":419},[405,624,625,627,629,632,634,636,639,641,643,646,648,651,653,656,658,660,662,664],{"class":407,"line":481},[405,626,448],{"class":419},[405,628,339],{"class":415},[405,630,631],{"class":453},"set",[405,633,457],{"class":419},[405,635,493],{"class":415},[405,637,638],{"class":496}," batch",[405,640,500],{"class":415},[405,642,416],{"class":415},[405,644,645],{"class":496}," size",[405,647,500],{"class":415},[405,649,650],{"class":531}," 50",[405,652,468],{"class":415},[405,654,655],{"class":496}," processed",[405,657,500],{"class":415},[405,659,650],{"class":531},[405,661,423],{"class":415},[405,663,423],{"class":415},[405,665,478],{"class":419},[405,667,669,671,673,676],{"class":407,"line":668},5,[405,670,448],{"class":419},[405,672,339],{"class":415},[405,674,675],{"class":453},"emit",[405,677,678],{"class":419},"()\n",[395,680,683],{"className":397,"code":681,"filename":682,"language":400,"meta":401,"style":401},"import { createRequestLogger } from 'evlog'\n\nconst log = createRequestLogger({ method: 'POST', path: '\u002Fapi\u002Fcheckout' })\nlog.set({ user: { id: 1, plan: 'pro' } })\nlog.emit()\n","src\u002Fworker.ts",[362,684,685,704,708,752,799],{"__ignoreMap":401},[405,686,687,689,691,694,696,698,700,702],{"class":407,"line":408},[405,688,412],{"class":411},[405,690,416],{"class":415},[405,692,693],{"class":419}," createRequestLogger",[405,695,423],{"class":415},[405,697,426],{"class":411},[405,699,429],{"class":415},[405,701,312],{"class":432},[405,703,435],{"class":415},[405,705,706],{"class":407,"line":438},[405,707,442],{"emptyLinePlaceholder":441},[405,709,710,712,714,716,718,720,722,725,727,729,732,734,736,739,741,743,746,748,750],{"class":407,"line":445},[405,711,580],{"class":579},[405,713,583],{"class":419},[405,715,586],{"class":415},[405,717,693],{"class":453},[405,719,457],{"class":419},[405,721,493],{"class":415},[405,723,724],{"class":496}," method",[405,726,500],{"class":415},[405,728,429],{"class":415},[405,730,731],{"class":432},"POST",[405,733,460],{"class":415},[405,735,468],{"class":415},[405,737,738],{"class":496}," path",[405,740,500],{"class":415},[405,742,429],{"class":415},[405,744,745],{"class":432},"\u002Fapi\u002Fcheckout",[405,747,460],{"class":415},[405,749,423],{"class":415},[405,751,478],{"class":419},[405,753,754,756,758,760,762,764,767,769,771,774,776,779,781,784,786,788,791,793,795,797],{"class":407,"line":481},[405,755,448],{"class":419},[405,757,339],{"class":415},[405,759,631],{"class":453},[405,761,457],{"class":419},[405,763,493],{"class":415},[405,765,766],{"class":496}," user",[405,768,500],{"class":415},[405,770,416],{"class":415},[405,772,773],{"class":496}," id",[405,775,500],{"class":415},[405,777,778],{"class":531}," 1",[405,780,468],{"class":415},[405,782,783],{"class":496}," plan",[405,785,500],{"class":415},[405,787,429],{"class":415},[405,789,790],{"class":432},"pro",[405,792,460],{"class":415},[405,794,423],{"class":415},[405,796,423],{"class":415},[405,798,478],{"class":419},[405,800,801,803,805,807],{"class":407,"line":668},[405,802,448],{"class":419},[405,804,339],{"class":415},[405,806,675],{"class":453},[405,808,678],{"class":419},[395,810,813],{"className":397,"code":811,"filename":812,"language":400,"meta":401,"style":401},"import { useLogger } from 'evlog'\n\nexport default defineEventHandler(async (event) => {\n  const log = useLogger(event)\n  log.set({ user: { id: 1, plan: 'pro' } })\n  return { success: true }\n  \u002F\u002F auto-emitted on response end\n})\n","server\u002Fapi\u002Fcheckout.post.ts",[362,814,815,834,838,870,888,931,951,958],{"__ignoreMap":401},[405,816,817,819,821,824,826,828,830,832],{"class":407,"line":408},[405,818,412],{"class":411},[405,820,416],{"class":415},[405,822,823],{"class":419}," useLogger",[405,825,423],{"class":415},[405,827,426],{"class":411},[405,829,429],{"class":415},[405,831,312],{"class":432},[405,833,435],{"class":415},[405,835,836],{"class":407,"line":438},[405,837,442],{"emptyLinePlaceholder":441},[405,839,840,843,846,849,851,854,857,861,864,867],{"class":407,"line":445},[405,841,842],{"class":411},"export",[405,844,845],{"class":411}," default",[405,847,848],{"class":453}," defineEventHandler",[405,850,457],{"class":419},[405,852,853],{"class":579},"async",[405,855,856],{"class":415}," (",[405,858,860],{"class":859},"sHdIc","event",[405,862,863],{"class":415},")",[405,865,866],{"class":579}," =>",[405,868,869],{"class":415}," {\n",[405,871,872,875,877,880,882,884,886],{"class":407,"line":481},[405,873,874],{"class":579},"  const",[405,876,420],{"class":419},[405,878,879],{"class":415}," =",[405,881,823],{"class":453},[405,883,457],{"class":496},[405,885,860],{"class":419},[405,887,478],{"class":496},[405,889,890,893,895,897,899,901,903,905,907,909,911,913,915,917,919,921,923,925,927,929],{"class":407,"line":668},[405,891,892],{"class":419},"  log",[405,894,339],{"class":415},[405,896,631],{"class":453},[405,898,457],{"class":496},[405,900,493],{"class":415},[405,902,766],{"class":496},[405,904,500],{"class":415},[405,906,416],{"class":415},[405,908,773],{"class":496},[405,910,500],{"class":415},[405,912,778],{"class":531},[405,914,468],{"class":415},[405,916,783],{"class":496},[405,918,500],{"class":415},[405,920,429],{"class":415},[405,922,790],{"class":432},[405,924,460],{"class":415},[405,926,423],{"class":415},[405,928,423],{"class":415},[405,930,478],{"class":496},[405,932,934,937,939,942,944,948],{"class":407,"line":933},6,[405,935,936],{"class":411},"  return",[405,938,416],{"class":415},[405,940,941],{"class":496}," success",[405,943,500],{"class":415},[405,945,947],{"class":946},"sfNiH"," true",[405,949,950],{"class":415}," }\n",[405,952,954],{"class":407,"line":953},7,[405,955,957],{"class":956},"sHwdD","  \u002F\u002F auto-emitted on response end\n",[405,959,961,964],{"class":407,"line":960},8,[405,962,963],{"class":415},"}",[405,965,478],{"class":419},[307,967,968],{},"One log, all context. Everything you need to understand what happened.",[385,970,51],{"id":971},"structured-errors",[307,973,974,975,977,978,981,982,985],{},"Errors with actionable context: ",[362,976,317],{}," it happened, how to ",[362,979,980],{},"fix"," it, and a ",[362,983,984],{},"link"," to docs:",[544,987,988,1112],{},[395,989,991],{"className":397,"code":990,"filename":812,"language":400,"meta":401,"style":401},"import { createError } from 'evlog'\n\nthrow createError({\n  message: 'Payment failed',\n  status: 402,\n  why: 'Card declined by issuer (insufficient funds)',\n  fix: 'Try a different payment method or contact your bank',\n  link: 'https:\u002F\u002Fdocs.example.com\u002Fpayments\u002Fdeclined',\n})\n",[362,992,993,1012,1016,1028,1045,1057,1073,1089,1105],{"__ignoreMap":401},[405,994,995,997,999,1002,1004,1006,1008,1010],{"class":407,"line":408},[405,996,412],{"class":411},[405,998,416],{"class":415},[405,1000,1001],{"class":419}," createError",[405,1003,423],{"class":415},[405,1005,426],{"class":411},[405,1007,429],{"class":415},[405,1009,312],{"class":432},[405,1011,435],{"class":415},[405,1013,1014],{"class":407,"line":438},[405,1015,442],{"emptyLinePlaceholder":441},[405,1017,1018,1021,1023,1025],{"class":407,"line":445},[405,1019,1020],{"class":411},"throw",[405,1022,1001],{"class":453},[405,1024,457],{"class":419},[405,1026,1027],{"class":415},"{\n",[405,1029,1030,1033,1035,1037,1040,1042],{"class":407,"line":481},[405,1031,1032],{"class":496},"  message",[405,1034,500],{"class":415},[405,1036,429],{"class":415},[405,1038,1039],{"class":432},"Payment failed",[405,1041,460],{"class":415},[405,1043,1044],{"class":415},",\n",[405,1046,1047,1050,1052,1055],{"class":407,"line":668},[405,1048,1049],{"class":496},"  status",[405,1051,500],{"class":415},[405,1053,1054],{"class":531}," 402",[405,1056,1044],{"class":415},[405,1058,1059,1062,1064,1066,1069,1071],{"class":407,"line":933},[405,1060,1061],{"class":496},"  why",[405,1063,500],{"class":415},[405,1065,429],{"class":415},[405,1067,1068],{"class":432},"Card declined by issuer (insufficient funds)",[405,1070,460],{"class":415},[405,1072,1044],{"class":415},[405,1074,1075,1078,1080,1082,1085,1087],{"class":407,"line":953},[405,1076,1077],{"class":496},"  fix",[405,1079,500],{"class":415},[405,1081,429],{"class":415},[405,1083,1084],{"class":432},"Try a different payment method or contact your bank",[405,1086,460],{"class":415},[405,1088,1044],{"class":415},[405,1090,1091,1094,1096,1098,1101,1103],{"class":407,"line":960},[405,1092,1093],{"class":496},"  link",[405,1095,500],{"class":415},[405,1097,429],{"class":415},[405,1099,1100],{"class":432},"https:\u002F\u002Fdocs.example.com\u002Fpayments\u002Fdeclined",[405,1102,460],{"class":415},[405,1104,1044],{"class":415},[405,1106,1108,1110],{"class":407,"line":1107},9,[405,1109,963],{"class":415},[405,1111,478],{"class":419},[395,1113,1118],{"className":1114,"code":1115,"filename":1116,"language":1117,"meta":401,"style":401},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"statusCode\": 402,\n  \"message\": \"Payment failed\",\n  \"data\": {\n    \"why\": \"Card declined by issuer (insufficient funds)\",\n    \"fix\": \"Try a different payment method or contact your bank\",\n    \"link\": \"https:\u002F\u002Fdocs.example.com\u002Fpayments\u002Fdeclined\"\n  }\n}\n","Response","json",[362,1119,1120,1124,1141,1161,1174,1194,1212,1229,1234],{"__ignoreMap":401},[405,1121,1122],{"class":407,"line":408},[405,1123,1027],{"class":415},[405,1125,1126,1129,1132,1135,1137,1139],{"class":407,"line":438},[405,1127,1128],{"class":415},"  \"",[405,1130,1131],{"class":579},"statusCode",[405,1133,1134],{"class":415},"\"",[405,1136,500],{"class":415},[405,1138,1054],{"class":531},[405,1140,1044],{"class":415},[405,1142,1143,1145,1148,1150,1152,1155,1157,1159],{"class":407,"line":445},[405,1144,1128],{"class":415},[405,1146,1147],{"class":579},"message",[405,1149,1134],{"class":415},[405,1151,500],{"class":415},[405,1153,1154],{"class":415}," \"",[405,1156,1039],{"class":432},[405,1158,1134],{"class":415},[405,1160,1044],{"class":415},[405,1162,1163,1165,1168,1170,1172],{"class":407,"line":481},[405,1164,1128],{"class":415},[405,1166,1167],{"class":579},"data",[405,1169,1134],{"class":415},[405,1171,500],{"class":415},[405,1173,869],{"class":415},[405,1175,1176,1179,1182,1184,1186,1188,1190,1192],{"class":407,"line":668},[405,1177,1178],{"class":415},"    \"",[405,1180,317],{"class":1181},"sBMFI",[405,1183,1134],{"class":415},[405,1185,500],{"class":415},[405,1187,1154],{"class":415},[405,1189,1068],{"class":432},[405,1191,1134],{"class":415},[405,1193,1044],{"class":415},[405,1195,1196,1198,1200,1202,1204,1206,1208,1210],{"class":407,"line":933},[405,1197,1178],{"class":415},[405,1199,980],{"class":1181},[405,1201,1134],{"class":415},[405,1203,500],{"class":415},[405,1205,1154],{"class":415},[405,1207,1084],{"class":432},[405,1209,1134],{"class":415},[405,1211,1044],{"class":415},[405,1213,1214,1216,1218,1220,1222,1224,1226],{"class":407,"line":953},[405,1215,1178],{"class":415},[405,1217,984],{"class":1181},[405,1219,1134],{"class":415},[405,1221,500],{"class":415},[405,1223,1154],{"class":415},[405,1225,1100],{"class":432},[405,1227,1228],{"class":415},"\"\n",[405,1230,1231],{"class":407,"line":960},[405,1232,1233],{"class":415},"  }\n",[405,1235,1236],{"class":407,"line":1107},[405,1237,1238],{"class":415},"}\n",[341,1240,1242],{"id":1241},"why-context-matters","Why Context Matters",[307,1244,1245,1246,1249],{},"We're entering an era where AI agents build, debug, and maintain applications. These agents need ",[310,1247,1248],{},"structured context"," to work effectively:",[1251,1252,1253,1261,1268],"ul",{},[1254,1255,1256,1260],"li",{},[310,1257,1258],{},[362,1259,317],{},": The root cause, so the agent understands what went wrong",[1254,1262,1263,1267],{},[310,1264,1265],{},[362,1266,980],{},": An actionable solution the agent can suggest or apply",[1254,1269,1270,1274],{},[310,1271,1272],{},[362,1273,984],{},": Documentation for complex issues",[307,1276,1277,1278,1280,1281,1284],{},"Traditional ",[362,1279,364],{}," and generic ",[362,1282,1283],{},"throw new Error()"," provide no actionable context. evlog's structured output is designed for both humans and AI to parse and act on.",[341,1286,1288],{"id":1287},"next-steps","Next Steps",[1251,1290,1291,1296,1301],{},[1254,1292,1293,1295],{},[327,1294,15],{"href":16}," - Install evlog in your project",[1254,1297,1298,1300],{},[327,1299,20],{"href":21}," - Get up and running in minutes",[1254,1302,1303,1306],{},[327,1304,1305],{"href":37},"Logging Overview"," - Understand the three logging modes in depth",[1308,1309,1310],"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 .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 .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}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":401,"searchDepth":438,"depth":438,"links":1312},[1313,1314,1319,1320],{"id":343,"depth":438,"text":344},{"id":379,"depth":438,"text":380,"children":1315},[1316,1317,1318],{"id":387,"depth":445,"text":41},{"id":539,"depth":445,"text":46},{"id":971,"depth":445,"text":51},{"id":1241,"depth":438,"text":1242},{"id":1287,"depth":438,"text":1288},"A structured logging library for TypeScript. Simple logging, wide events, and structured errors, from quick one-liners to comprehensive request-scoped events.","md",[1324,1327],{"label":20,"icon":23,"to":21,"color":1325,"variant":1326},"neutral","subtle",{"label":1328,"icon":1329,"to":1330,"target":1331,"color":1325,"variant":1326},"GitHub","i-simple-icons-github","https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog","_blank",{},{"icon":13},{"title":10,"description":1321},"lasG4WwDCeQyjiRVCb6dezwNUZibnnLMwxx1ewXSXyw",[1337,1338],null,{"title":15,"path":16,"stem":17,"description":1339,"icon":18,"children":-1},"Install evlog in your TypeScript project. Supports Nuxt, Next.js, SvelteKit, Hono, Express, Fastify, Elysia, NestJS, and standalone scripts.",1777048036769]