[{"data":1,"prerenderedAt":1558},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-introduction":429,"-getting-started-introduction-surround":1554},[4,35,159,201,289,326,413],{"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,297,302,307,312,317,321],{"title":41,"path":295,"stem":296,"icon":54},"\u002Fbuild-on-top\u002Foverview","5.build-on-top\u002F0.overview",{"title":298,"path":299,"stem":300,"icon":301},"Stream API","\u002Fbuild-on-top\u002Fstream-api","5.build-on-top\u002F1.stream-api","i-lucide-radio-tower",{"title":303,"path":304,"stem":305,"icon":306},"Stream server","\u002Fbuild-on-top\u002Fstream-server","5.build-on-top\u002F2.stream-server","i-lucide-radio",{"title":308,"path":309,"stem":310,"icon":311},"FS reader","\u002Fbuild-on-top\u002Ffs-reader","5.build-on-top\u002F3.fs-reader","i-lucide-folder-search",{"title":313,"path":314,"stem":315,"icon":316},"Identity headers","\u002Fbuild-on-top\u002Fidentity-headers","5.build-on-top\u002F4.identity-headers","i-lucide-fingerprint",{"title":156,"path":318,"stem":319,"icon":320},"\u002Fbuild-on-top\u002Frecipes","5.build-on-top\u002F5.recipes","i-lucide-chef-hat",{"title":322,"path":323,"stem":324,"icon":325},"Catalogs as packages","\u002Fbuild-on-top\u002Fcatalogs-as-packages","5.build-on-top\u002F6.catalogs-as-packages","i-lucide-package",{"title":327,"path":328,"stem":329,"children":330,"page":34},"Adapters","\u002Fadapters","6.adapters",[331,334,374,389],{"title":41,"path":332,"stem":333,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":335,"path":336,"stem":337,"children":338,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[339,344,349,354,359,364,369],{"title":340,"path":341,"stem":342,"icon":343},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":345,"path":346,"stem":347,"icon":348},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":350,"path":351,"stem":352,"icon":353},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":355,"path":356,"stem":357,"icon":358},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":360,"path":361,"stem":362,"icon":363},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":365,"path":366,"stem":367,"icon":368},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":370,"path":371,"stem":372,"icon":373},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":375,"path":376,"stem":377,"children":378,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[379,384],{"title":380,"path":381,"stem":382,"icon":383},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":385,"path":386,"stem":387,"icon":388},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":390,"path":391,"stem":392,"children":393,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[394,399,404,408],{"title":395,"path":396,"stem":397,"icon":398},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline","i-lucide-workflow",{"title":400,"path":401,"stem":402,"icon":403},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":405,"path":406,"stem":407,"icon":83},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":409,"path":410,"stem":411,"icon":412},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":414,"path":415,"stem":416,"children":417,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[418,421,425],{"title":41,"path":419,"stem":420,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":422,"path":423,"stem":424,"icon":288},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":426,"path":427,"stem":428,"icon":83},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":430,"title":10,"body":431,"description":1539,"extension":1540,"links":1541,"meta":1550,"navigation":1551,"path":11,"seo":1552,"stem":12,"__hash__":1553},"docs\u002F1.getting-started\u002F1.introduction.md",{"type":432,"value":433,"toc":1528},"minimark",[434,447,464,469,472,477,499,511,515,518,581,588,592,595,599,605,747,750,753,1176,1179,1182,1194,1447,1451,1458,1481,1491,1495,1524],[435,436,437,441,442,446],"p",{},[438,439,440],"strong",{},"evlog"," is a modern TypeScript logger built for everything you ship. It gives you simple structured logs (a drop-in for ",[443,444,445],"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.",[435,448,449,450,457,458,463],{},"Inspired by ",[451,452,456],"a",{"href":453,"rel":454},"https:\u002F\u002Floggingsucks.com\u002F",[455],"nofollow","Logging Sucks"," by ",[451,459,462],{"href":460,"rel":461},"https:\u002F\u002Fx.com\u002Fboristane",[455],"Boris Tane",".",[465,466,468],"h2",{"id":467},"philosophy","Philosophy",[435,470,471],{},"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.",[435,473,474,476],{},[438,475,440],{}," takes a different approach:",[478,479,480,488,491,494],"card-group",{},[481,482,484,485,487],"card",{"icon":49,"title":483},"Structured Logging","Replace ",[443,486,445],{}," with typed, structured events that flow through a drain pipeline. Same level filtering, redaction, and pretty\u002FJSON output as pino or consola.",[481,489,490],{"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.",[481,492,493],{"icon":59,"title":56},"Errors that explain why they occurred and how to fix them.",[481,495,498],{"icon":496,"title":497},"i-lucide-palette","Pretty for Dev","Human-readable in development, machine-parseable JSON in production.",[500,501,503,504,507,508,510],"callout",{"color":502,"icon":403},"info","Not running an HTTP framework? See ",[451,505,506],{"href":272},"Standalone TypeScript"," for scripts, workers, and CLIs, and ",[451,509,266],{"href":267}," for the edge runtime.",[465,512,514],{"id":513},"why-evlog-over-pino-winston-or-consola","Why evlog over pino, winston, or consola",[435,516,517],{},"evlog is a fully-featured general-purpose logger that happens to also do wide events. Concretely:",[519,520,521,532,550,567],"ul",{},[522,523,524,527,528,531],"li",{},[438,525,526],{},"Zero transitive dependencies"," and ~6 kB gzip — nothing to audit, nothing that breaks on the next Node LTS. Benchmarked at ",[451,529,530],{"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.",[522,533,534,537,538,541,542,545,546,549],{},[438,535,536],{},"Same API in every context"," — scripts, frameworks, edge runtimes, browser, library code. No ",[443,539,540],{},"pino-http"," vs ",[443,543,544],{},"pino"," split, no separate ",[443,547,548],{},"consola"," reporters per environment.",[522,551,552,566],{},[438,553,554,555,558,559,558,562,565],{},"Structured errors with ",[443,556,557],{},"why"," \u002F ",[443,560,561],{},"fix",[443,563,564],{},"link"," built in"," — your error toast finally tells users what went wrong and what to do, your on-call stops reverse-engineering stack traces.",[522,568,569,572,573,576,577,580],{},[438,570,571],{},"Wide events as a free upgrade path"," — when you need to correlate context across an operation, the same logger gives you ",[443,574,575],{},"log.set"," + ",[443,578,579],{},"log.emit"," instead of stitching log lines together later.",[435,582,583,584,587],{},"See the full ",[451,585,586],{"href":31},"feature comparison"," (parity matrix, honest gaps, and migration snippets) for a side-by-side with pino, winston, and consola.",[465,589,591],{"id":590},"three-ways-to-log","Three Ways to Log",[435,593,594],{},"evlog provides three APIs for different contexts. You can use all three in the same project.",[596,597,46],"h3",{"id":598},"simple-logging",[435,600,601,602,604],{},"Fire-and-forget structured logs. Replace ",[443,603,445],{},", consola, or pino:",[606,607,613],"pre",{"className":608,"code":609,"filename":610,"language":611,"meta":612,"style":612},"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","",[443,614,615,647,654,689],{"__ignoreMap":612},[616,617,620,624,628,632,635,638,641,644],"span",{"class":618,"line":619},"line",1,[616,621,623],{"class":622},"s7zQu","import",[616,625,627],{"class":626},"sMK4o"," {",[616,629,631],{"class":630},"sTEyZ"," log",[616,633,634],{"class":626}," }",[616,636,637],{"class":622}," from",[616,639,640],{"class":626}," '",[616,642,440],{"class":643},"sfazB",[616,645,646],{"class":626},"'\n",[616,648,650],{"class":618,"line":649},2,[616,651,653],{"emptyLinePlaceholder":652},true,"\n",[616,655,657,660,662,665,668,671,674,676,679,681,684,686],{"class":618,"line":656},3,[616,658,659],{"class":630},"log",[616,661,463],{"class":626},[616,663,502],{"class":664},"s2Zo4",[616,666,667],{"class":630},"(",[616,669,670],{"class":626},"'",[616,672,673],{"class":643},"auth",[616,675,670],{"class":626},[616,677,678],{"class":626},",",[616,680,640],{"class":626},[616,682,683],{"class":643},"User logged in",[616,685,670],{"class":626},[616,687,688],{"class":630},")\n",[616,690,692,694,696,699,701,704,708,711,713,716,718,720,723,725,727,730,732,734,737,739,743,745],{"class":618,"line":691},4,[616,693,659],{"class":630},[616,695,463],{"class":626},[616,697,698],{"class":664},"error",[616,700,667],{"class":630},[616,702,703],{"class":626},"{",[616,705,707],{"class":706},"swJcz"," action",[616,709,710],{"class":626},":",[616,712,640],{"class":626},[616,714,715],{"class":643},"payment",[616,717,670],{"class":626},[616,719,678],{"class":626},[616,721,722],{"class":706}," error",[616,724,710],{"class":626},[616,726,640],{"class":626},[616,728,729],{"class":643},"card_declined",[616,731,670],{"class":626},[616,733,678],{"class":626},[616,735,736],{"class":706}," userId",[616,738,710],{"class":626},[616,740,742],{"class":741},"sbssI"," 42",[616,744,634],{"class":626},[616,746,688],{"class":630},[596,748,51],{"id":749},"wide-events",[435,751,752],{},"Accumulate context progressively over any operation, then emit a single comprehensive event:",[754,755,756,889,1019],"code-group",{},[606,757,760],{"className":608,"code":758,"filename":759,"language":611,"meta":612,"style":612},"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",[443,761,762,781,785,833,876],{"__ignoreMap":612},[616,763,764,766,768,771,773,775,777,779],{"class":618,"line":619},[616,765,623],{"class":622},[616,767,627],{"class":626},[616,769,770],{"class":630}," createLogger",[616,772,634],{"class":626},[616,774,637],{"class":622},[616,776,640],{"class":626},[616,778,440],{"class":643},[616,780,646],{"class":626},[616,782,783],{"class":618,"line":649},[616,784,653],{"emptyLinePlaceholder":652},[616,786,787,791,794,797,799,801,803,806,808,810,813,815,817,820,822,824,827,829,831],{"class":618,"line":656},[616,788,790],{"class":789},"spNyl","const",[616,792,793],{"class":630}," log ",[616,795,796],{"class":626},"=",[616,798,770],{"class":664},[616,800,667],{"class":630},[616,802,703],{"class":626},[616,804,805],{"class":706}," jobId",[616,807,710],{"class":626},[616,809,640],{"class":626},[616,811,812],{"class":643},"sync-001",[616,814,670],{"class":626},[616,816,678],{"class":626},[616,818,819],{"class":706}," queue",[616,821,710],{"class":626},[616,823,640],{"class":626},[616,825,826],{"class":643},"emails",[616,828,670],{"class":626},[616,830,634],{"class":626},[616,832,688],{"class":630},[616,834,835,837,839,842,844,846,849,851,853,856,858,861,863,866,868,870,872,874],{"class":618,"line":691},[616,836,659],{"class":630},[616,838,463],{"class":626},[616,840,841],{"class":664},"set",[616,843,667],{"class":630},[616,845,703],{"class":626},[616,847,848],{"class":706}," batch",[616,850,710],{"class":626},[616,852,627],{"class":626},[616,854,855],{"class":706}," size",[616,857,710],{"class":626},[616,859,860],{"class":741}," 50",[616,862,678],{"class":626},[616,864,865],{"class":706}," processed",[616,867,710],{"class":626},[616,869,860],{"class":741},[616,871,634],{"class":626},[616,873,634],{"class":626},[616,875,688],{"class":630},[616,877,879,881,883,886],{"class":618,"line":878},5,[616,880,659],{"class":630},[616,882,463],{"class":626},[616,884,885],{"class":664},"emit",[616,887,888],{"class":630},"()\n",[606,890,893],{"className":608,"code":891,"filename":892,"language":611,"meta":612,"style":612},"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",[443,894,895,914,918,962,1009],{"__ignoreMap":612},[616,896,897,899,901,904,906,908,910,912],{"class":618,"line":619},[616,898,623],{"class":622},[616,900,627],{"class":626},[616,902,903],{"class":630}," createRequestLogger",[616,905,634],{"class":626},[616,907,637],{"class":622},[616,909,640],{"class":626},[616,911,440],{"class":643},[616,913,646],{"class":626},[616,915,916],{"class":618,"line":649},[616,917,653],{"emptyLinePlaceholder":652},[616,919,920,922,924,926,928,930,932,935,937,939,942,944,946,949,951,953,956,958,960],{"class":618,"line":656},[616,921,790],{"class":789},[616,923,793],{"class":630},[616,925,796],{"class":626},[616,927,903],{"class":664},[616,929,667],{"class":630},[616,931,703],{"class":626},[616,933,934],{"class":706}," method",[616,936,710],{"class":626},[616,938,640],{"class":626},[616,940,941],{"class":643},"POST",[616,943,670],{"class":626},[616,945,678],{"class":626},[616,947,948],{"class":706}," path",[616,950,710],{"class":626},[616,952,640],{"class":626},[616,954,955],{"class":643},"\u002Fapi\u002Fcheckout",[616,957,670],{"class":626},[616,959,634],{"class":626},[616,961,688],{"class":630},[616,963,964,966,968,970,972,974,977,979,981,984,986,989,991,994,996,998,1001,1003,1005,1007],{"class":618,"line":691},[616,965,659],{"class":630},[616,967,463],{"class":626},[616,969,841],{"class":664},[616,971,667],{"class":630},[616,973,703],{"class":626},[616,975,976],{"class":706}," user",[616,978,710],{"class":626},[616,980,627],{"class":626},[616,982,983],{"class":706}," id",[616,985,710],{"class":626},[616,987,988],{"class":741}," 1",[616,990,678],{"class":626},[616,992,993],{"class":706}," plan",[616,995,710],{"class":626},[616,997,640],{"class":626},[616,999,1000],{"class":643},"pro",[616,1002,670],{"class":626},[616,1004,634],{"class":626},[616,1006,634],{"class":626},[616,1008,688],{"class":630},[616,1010,1011,1013,1015,1017],{"class":618,"line":878},[616,1012,659],{"class":630},[616,1014,463],{"class":626},[616,1016,885],{"class":664},[616,1018,888],{"class":630},[606,1020,1023],{"className":608,"code":1021,"filename":1022,"language":611,"meta":612,"style":612},"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",[443,1024,1025,1044,1048,1080,1098,1141,1161,1168],{"__ignoreMap":612},[616,1026,1027,1029,1031,1034,1036,1038,1040,1042],{"class":618,"line":619},[616,1028,623],{"class":622},[616,1030,627],{"class":626},[616,1032,1033],{"class":630}," useLogger",[616,1035,634],{"class":626},[616,1037,637],{"class":622},[616,1039,640],{"class":626},[616,1041,440],{"class":643},[616,1043,646],{"class":626},[616,1045,1046],{"class":618,"line":649},[616,1047,653],{"emptyLinePlaceholder":652},[616,1049,1050,1053,1056,1059,1061,1064,1067,1071,1074,1077],{"class":618,"line":656},[616,1051,1052],{"class":622},"export",[616,1054,1055],{"class":622}," default",[616,1057,1058],{"class":664}," defineEventHandler",[616,1060,667],{"class":630},[616,1062,1063],{"class":789},"async",[616,1065,1066],{"class":626}," (",[616,1068,1070],{"class":1069},"sHdIc","event",[616,1072,1073],{"class":626},")",[616,1075,1076],{"class":789}," =>",[616,1078,1079],{"class":626}," {\n",[616,1081,1082,1085,1087,1090,1092,1094,1096],{"class":618,"line":691},[616,1083,1084],{"class":789},"  const",[616,1086,631],{"class":630},[616,1088,1089],{"class":626}," =",[616,1091,1033],{"class":664},[616,1093,667],{"class":706},[616,1095,1070],{"class":630},[616,1097,688],{"class":706},[616,1099,1100,1103,1105,1107,1109,1111,1113,1115,1117,1119,1121,1123,1125,1127,1129,1131,1133,1135,1137,1139],{"class":618,"line":878},[616,1101,1102],{"class":630},"  log",[616,1104,463],{"class":626},[616,1106,841],{"class":664},[616,1108,667],{"class":706},[616,1110,703],{"class":626},[616,1112,976],{"class":706},[616,1114,710],{"class":626},[616,1116,627],{"class":626},[616,1118,983],{"class":706},[616,1120,710],{"class":626},[616,1122,988],{"class":741},[616,1124,678],{"class":626},[616,1126,993],{"class":706},[616,1128,710],{"class":626},[616,1130,640],{"class":626},[616,1132,1000],{"class":643},[616,1134,670],{"class":626},[616,1136,634],{"class":626},[616,1138,634],{"class":626},[616,1140,688],{"class":706},[616,1142,1144,1147,1149,1152,1154,1158],{"class":618,"line":1143},6,[616,1145,1146],{"class":622},"  return",[616,1148,627],{"class":626},[616,1150,1151],{"class":706}," success",[616,1153,710],{"class":626},[616,1155,1157],{"class":1156},"sfNiH"," true",[616,1159,1160],{"class":626}," }\n",[616,1162,1164],{"class":618,"line":1163},7,[616,1165,1167],{"class":1166},"sHwdD","  \u002F\u002F auto-emitted on response end\n",[616,1169,1171,1174],{"class":618,"line":1170},8,[616,1172,1173],{"class":626},"}",[616,1175,688],{"class":630},[435,1177,1178],{},"One log, all context. Everything you need to understand what happened.",[596,1180,56],{"id":1181},"structured-errors",[435,1183,1184,1185,1187,1188,1190,1191,1193],{},"Errors with actionable context: ",[443,1186,557],{}," it happened, how to ",[443,1189,561],{}," it, and a ",[443,1192,564],{}," to docs:",[754,1195,1196,1320],{},[606,1197,1199],{"className":608,"code":1198,"filename":1022,"language":611,"meta":612,"style":612},"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",[443,1200,1201,1220,1224,1236,1253,1265,1281,1297,1313],{"__ignoreMap":612},[616,1202,1203,1205,1207,1210,1212,1214,1216,1218],{"class":618,"line":619},[616,1204,623],{"class":622},[616,1206,627],{"class":626},[616,1208,1209],{"class":630}," createError",[616,1211,634],{"class":626},[616,1213,637],{"class":622},[616,1215,640],{"class":626},[616,1217,440],{"class":643},[616,1219,646],{"class":626},[616,1221,1222],{"class":618,"line":649},[616,1223,653],{"emptyLinePlaceholder":652},[616,1225,1226,1229,1231,1233],{"class":618,"line":656},[616,1227,1228],{"class":622},"throw",[616,1230,1209],{"class":664},[616,1232,667],{"class":630},[616,1234,1235],{"class":626},"{\n",[616,1237,1238,1241,1243,1245,1248,1250],{"class":618,"line":691},[616,1239,1240],{"class":706},"  message",[616,1242,710],{"class":626},[616,1244,640],{"class":626},[616,1246,1247],{"class":643},"Payment failed",[616,1249,670],{"class":626},[616,1251,1252],{"class":626},",\n",[616,1254,1255,1258,1260,1263],{"class":618,"line":878},[616,1256,1257],{"class":706},"  status",[616,1259,710],{"class":626},[616,1261,1262],{"class":741}," 402",[616,1264,1252],{"class":626},[616,1266,1267,1270,1272,1274,1277,1279],{"class":618,"line":1143},[616,1268,1269],{"class":706},"  why",[616,1271,710],{"class":626},[616,1273,640],{"class":626},[616,1275,1276],{"class":643},"Card declined by issuer (insufficient funds)",[616,1278,670],{"class":626},[616,1280,1252],{"class":626},[616,1282,1283,1286,1288,1290,1293,1295],{"class":618,"line":1163},[616,1284,1285],{"class":706},"  fix",[616,1287,710],{"class":626},[616,1289,640],{"class":626},[616,1291,1292],{"class":643},"Try a different payment method or contact your bank",[616,1294,670],{"class":626},[616,1296,1252],{"class":626},[616,1298,1299,1302,1304,1306,1309,1311],{"class":618,"line":1170},[616,1300,1301],{"class":706},"  link",[616,1303,710],{"class":626},[616,1305,640],{"class":626},[616,1307,1308],{"class":643},"https:\u002F\u002Fdocs.example.com\u002Fpayments\u002Fdeclined",[616,1310,670],{"class":626},[616,1312,1252],{"class":626},[616,1314,1316,1318],{"class":618,"line":1315},9,[616,1317,1173],{"class":626},[616,1319,688],{"class":630},[606,1321,1326],{"className":1322,"code":1323,"filename":1324,"language":1325,"meta":612,"style":612},"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",[443,1327,1328,1332,1349,1369,1382,1402,1420,1437,1442],{"__ignoreMap":612},[616,1329,1330],{"class":618,"line":619},[616,1331,1235],{"class":626},[616,1333,1334,1337,1340,1343,1345,1347],{"class":618,"line":649},[616,1335,1336],{"class":626},"  \"",[616,1338,1339],{"class":789},"statusCode",[616,1341,1342],{"class":626},"\"",[616,1344,710],{"class":626},[616,1346,1262],{"class":741},[616,1348,1252],{"class":626},[616,1350,1351,1353,1356,1358,1360,1363,1365,1367],{"class":618,"line":656},[616,1352,1336],{"class":626},[616,1354,1355],{"class":789},"message",[616,1357,1342],{"class":626},[616,1359,710],{"class":626},[616,1361,1362],{"class":626}," \"",[616,1364,1247],{"class":643},[616,1366,1342],{"class":626},[616,1368,1252],{"class":626},[616,1370,1371,1373,1376,1378,1380],{"class":618,"line":691},[616,1372,1336],{"class":626},[616,1374,1375],{"class":789},"data",[616,1377,1342],{"class":626},[616,1379,710],{"class":626},[616,1381,1079],{"class":626},[616,1383,1384,1387,1390,1392,1394,1396,1398,1400],{"class":618,"line":878},[616,1385,1386],{"class":626},"    \"",[616,1388,557],{"class":1389},"sBMFI",[616,1391,1342],{"class":626},[616,1393,710],{"class":626},[616,1395,1362],{"class":626},[616,1397,1276],{"class":643},[616,1399,1342],{"class":626},[616,1401,1252],{"class":626},[616,1403,1404,1406,1408,1410,1412,1414,1416,1418],{"class":618,"line":1143},[616,1405,1386],{"class":626},[616,1407,561],{"class":1389},[616,1409,1342],{"class":626},[616,1411,710],{"class":626},[616,1413,1362],{"class":626},[616,1415,1292],{"class":643},[616,1417,1342],{"class":626},[616,1419,1252],{"class":626},[616,1421,1422,1424,1426,1428,1430,1432,1434],{"class":618,"line":1163},[616,1423,1386],{"class":626},[616,1425,564],{"class":1389},[616,1427,1342],{"class":626},[616,1429,710],{"class":626},[616,1431,1362],{"class":626},[616,1433,1308],{"class":643},[616,1435,1436],{"class":626},"\"\n",[616,1438,1439],{"class":618,"line":1170},[616,1440,1441],{"class":626},"  }\n",[616,1443,1444],{"class":618,"line":1315},[616,1445,1446],{"class":626},"}\n",[465,1448,1450],{"id":1449},"why-context-matters","Why Context Matters",[435,1452,1453,1454,1457],{},"We're entering an era where AI agents build, debug, and maintain applications. These agents need ",[438,1455,1456],{},"structured context"," to work effectively:",[519,1459,1460,1467,1474],{},[522,1461,1462,1466],{},[438,1463,1464],{},[443,1465,557],{},": The root cause, so the agent understands what went wrong",[522,1468,1469,1473],{},[438,1470,1471],{},[443,1472,561],{},": An actionable solution the agent can suggest or apply",[522,1475,1476,1480],{},[438,1477,1478],{},[443,1479,564],{},": Documentation for complex issues",[435,1482,1483,1484,1486,1487,1490],{},"Traditional ",[443,1485,445],{}," and generic ",[443,1488,1489],{},"throw new Error()"," provide no actionable context. evlog's structured output is designed for both humans and AI to parse and act on.",[465,1492,1494],{"id":1493},"next-steps","Next Steps",[519,1496,1497,1502,1507,1513,1519],{},[522,1498,1499,1501],{},[451,1500,15],{"href":16}," - Install evlog in your project",[522,1503,1504,1506],{},[451,1505,20],{"href":21}," - Get up and running in minutes",[522,1508,1509,1512],{},[451,1510,1511],{"href":42},"Logging Overview"," - Understand the three logging modes in depth",[522,1514,1515,1518],{},[451,1516,1517],{"href":31},"evlog vs pino, winston, consola"," - Feature parity, honest gaps, and migration snippets",[522,1520,1521,1523],{},[451,1522,506],{"href":272}," — scripts, workers, libraries without a web framework",[1525,1526,1527],"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":612,"searchDepth":649,"depth":649,"links":1529},[1530,1531,1532,1537,1538],{"id":467,"depth":649,"text":468},{"id":513,"depth":649,"text":514},{"id":590,"depth":649,"text":591,"children":1533},[1534,1535,1536],{"id":598,"depth":656,"text":46},{"id":749,"depth":656,"text":51},{"id":1181,"depth":656,"text":56},{"id":1449,"depth":649,"text":1450},{"id":1493,"depth":649,"text":1494},"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",[1542,1545],{"label":20,"icon":23,"to":21,"color":1543,"variant":1544},"neutral","subtle",{"label":1546,"icon":1547,"to":1548,"target":1549,"color":1543,"variant":1544},"GitHub","i-simple-icons-github","https:\u002F\u002Fgithub.com\u002Fhugorcd\u002Fevlog","_blank",{},{"icon":13},{"title":10,"description":1539},"ggo4Lnufs_klF2bzb0k9vN7ZaI4_KoFJlxqtYPeZxuw",[1555,1556],null,{"title":15,"path":16,"stem":17,"description":1557,"icon":18,"children":-1},"Install evlog in your TypeScript project. Supports Nuxt, Next.js, SvelteKit, Hono, Express, Fastify, Elysia, NestJS, and standalone scripts.",1778336616360]