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