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