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