[{"data":1,"prerenderedAt":1117},["ShallowReactive",2],{"navigation_docs":3,"-libraries-overview":612,"-libraries-overview-surround":1112},[4,35,85,138,318,453,489,548,587],{"title":5,"path":6,"stem":7,"children":8,"page":34},"Start","\u002Fstart","1.start",[9,14,19,24,29],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fstart\u002Fintroduction","1.start\u002F1.introduction","i-lucide-info",{"title":15,"path":16,"stem":17,"icon":18},"Why start with evlog","\u002Fstart\u002Fwhy-evlog","1.start\u002F2.why-evlog","i-lucide-rocket",{"title":20,"path":21,"stem":22,"icon":23},"Installation","\u002Fstart\u002Finstallation","1.start\u002F3.installation","i-lucide-download",{"title":25,"path":26,"stem":27,"icon":28},"Quick Start","\u002Fstart\u002Fquick-start","1.start\u002F4.quick-start","i-lucide-zap",{"title":30,"path":31,"stem":32,"icon":33},"Choose your logger","\u002Fstart\u002Ftypescript-logging-library","1.start\u002F5.typescript-logging-library","i-lucide-file-code",false,{"title":36,"path":37,"stem":38,"children":39,"page":34},"Learn","\u002Flearn","2.learn",[40,45,50,55,60,65,70,75,80],{"title":41,"path":42,"stem":43,"icon":44},"Overview","\u002Flearn\u002Foverview","2.learn\u002F0.overview","i-lucide-list",{"title":46,"path":47,"stem":48,"icon":49},"Simple Logging","\u002Flearn\u002Fsimple-logging","2.learn\u002F1.simple-logging","i-lucide-terminal",{"title":51,"path":52,"stem":53,"icon":54},"Wide Events","\u002Flearn\u002Fwide-events","2.learn\u002F2.wide-events","i-lucide-layers",{"title":56,"path":57,"stem":58,"icon":59},"Structured Errors","\u002Flearn\u002Fstructured-errors","2.learn\u002F3.structured-errors","i-lucide-shield-alert",{"title":61,"path":62,"stem":63,"icon":64},"Lifecycle","\u002Flearn\u002Flifecycle","2.learn\u002F4.lifecycle","i-lucide-arrow-right-left",{"title":66,"path":67,"stem":68,"icon":69},"Sampling","\u002Flearn\u002Fsampling","2.learn\u002F5.sampling","i-lucide-filter",{"title":71,"path":72,"stem":73,"icon":74},"Auto-Redaction","\u002Flearn\u002Fredaction","2.learn\u002F6.redaction","i-lucide-eye-off",{"title":76,"path":77,"stem":78,"icon":79},"Typed Fields","\u002Flearn\u002Ftyped-fields","2.learn\u002F7.typed-fields","i-simple-icons-typescript",{"title":81,"path":82,"stem":83,"icon":84},"Catalogs","\u002Flearn\u002Fcatalogs","2.learn\u002F8.catalogs","i-lucide-book-open",{"title":86,"path":87,"stem":88,"children":89,"page":34},"CLI","\u002Fcli","3.cli",[90,93,98,103,108,113,118,123,128,133],{"title":41,"path":91,"stem":92,"icon":49},"\u002Fcli\u002Foverview","3.cli\u002F0.overview",{"title":94,"path":95,"stem":96,"icon":97},"init","\u002Fcli\u002Finit","3.cli\u002F1.init","i-lucide-wand-sparkles",{"title":99,"path":100,"stem":101,"icon":102},"map","\u002Fcli\u002Fmap","3.cli\u002F2.map","i-lucide-radar",{"title":104,"path":105,"stem":106,"icon":107},"Rules","\u002Fcli\u002Frules","3.cli\u002F3.rules","i-lucide-list-checks",{"title":109,"path":110,"stem":111,"icon":112},"Scoring","\u002Fcli\u002Fscoring","3.cli\u002F4.scoring","i-lucide-gauge",{"title":114,"path":115,"stem":116,"icon":117},"CI","\u002Fcli\u002Fci","3.cli\u002F5.ci","i-lucide-git-pull-request",{"title":119,"path":120,"stem":121,"icon":122},"doctor","\u002Fcli\u002Fdoctor","3.cli\u002F6.doctor","i-lucide-stethoscope",{"title":124,"path":125,"stem":126,"icon":127},"telemetry","\u002Fcli\u002Ftelemetry","3.cli\u002F7.telemetry","i-lucide-bar-chart-3",{"title":129,"path":130,"stem":131,"icon":132},"agents","\u002Fcli\u002Fagents","3.cli\u002F8.agents","i-lucide-bot",{"title":134,"path":135,"stem":136,"icon":137},"Observability Score","\u002Fcli\u002Fobservability-score","3.cli\u002F9.observability-score","i-lucide-activity",{"title":139,"path":140,"stem":141,"children":142,"page":34},"Integrate","\u002Fintegrate","4.integrate",[143,147,230],{"title":41,"path":144,"stem":145,"icon":146},"\u002Fintegrate\u002Foverview","4.integrate\u002F0.overview","i-lucide-plug",{"title":148,"path":149,"stem":150,"children":151,"page":34},"Adapters","\u002Fintegrate\u002Fadapters","4.integrate\u002Fadapters",[152,155,185,210],{"title":41,"path":153,"stem":154,"icon":44},"\u002Fintegrate\u002Fadapters\u002Foverview","4.integrate\u002Fadapters\u002F01.overview",{"title":156,"path":157,"stem":158,"children":159,"page":34},"Cloud","\u002Fintegrate\u002Fadapters\u002Fcloud","4.integrate\u002Fadapters\u002Fcloud",[160,165,170,175,180],{"title":161,"path":162,"stem":163,"icon":164},"Axiom","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Faxiom","4.integrate\u002Fadapters\u002Fcloud\u002F01.axiom","i-custom-axiom",{"title":166,"path":167,"stem":168,"icon":169},"PostHog","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fposthog","4.integrate\u002Fadapters\u002Fcloud\u002F02.posthog","i-simple-icons-posthog",{"title":171,"path":172,"stem":173,"icon":174},"Sentry","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fsentry","4.integrate\u002Fadapters\u002Fcloud\u002F03.sentry","i-simple-icons-sentry",{"title":176,"path":177,"stem":178,"icon":179},"Better Stack","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fbetter-stack","4.integrate\u002Fadapters\u002Fcloud\u002F04.better-stack","i-simple-icons-betterstack",{"title":181,"path":182,"stem":183,"icon":184},"Datadog","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fdatadog","4.integrate\u002Fadapters\u002Fcloud\u002F05.datadog","i-simple-icons-datadog",{"title":186,"path":187,"stem":188,"children":189,"page":34},"Cloud or Self-Hosted","\u002Fintegrate\u002Fadapters\u002Fhybrid","4.integrate\u002Fadapters\u002Fhybrid",[190,195,200,205],{"title":191,"path":192,"stem":193,"icon":194},"Grafana Loki","\u002Fintegrate\u002Fadapters\u002Fhybrid\u002Floki","4.integrate\u002Fadapters\u002Fhybrid\u002F01.loki","i-simple-icons-grafana",{"title":196,"path":197,"stem":198,"icon":199},"ClickHouse","\u002Fintegrate\u002Fadapters\u002Fhybrid\u002Fclickhouse","4.integrate\u002Fadapters\u002Fhybrid\u002F02.clickhouse","i-simple-icons-clickhouse",{"title":201,"path":202,"stem":203,"icon":204},"OTLP","\u002Fintegrate\u002Fadapters\u002Fhybrid\u002Fotlp","4.integrate\u002Fadapters\u002Fhybrid\u002F03.otlp","i-simple-icons-opentelemetry",{"title":206,"path":207,"stem":208,"icon":209},"HyperDX","\u002Fintegrate\u002Fadapters\u002Fhybrid\u002Fhyperdx","4.integrate\u002Fadapters\u002Fhybrid\u002F04.hyperdx","i-custom-hyperdx",{"title":211,"path":212,"stem":213,"children":214,"page":34},"Self-Hosted","\u002Fintegrate\u002Fadapters\u002Fself-hosted","4.integrate\u002Fadapters\u002Fself-hosted",[215,220,225],{"title":216,"path":217,"stem":218,"icon":219},"File System","\u002Fintegrate\u002Fadapters\u002Fself-hosted\u002Ffs","4.integrate\u002Fadapters\u002Fself-hosted\u002F01.fs","i-lucide-hard-drive",{"title":221,"path":222,"stem":223,"icon":224},"NuxtHub","\u002Fintegrate\u002Fadapters\u002Fself-hosted\u002Fnuxthub","4.integrate\u002Fadapters\u002Fself-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":226,"path":227,"stem":228,"icon":229},"Memory","\u002Fintegrate\u002Fadapters\u002Fself-hosted\u002Fmemory","4.integrate\u002Fadapters\u002Fself-hosted\u002F03.memory","i-lucide-cpu",{"title":231,"path":232,"stem":233,"children":234,"page":34},"Frameworks","\u002Fintegrate\u002Fframeworks","4.integrate\u002Fframeworks",[235,239,244,249,254,259,264,269,274,279,284,289,294,299,303,308,313],{"title":41,"path":236,"stem":237,"icon":238},"\u002Fintegrate\u002Fframeworks\u002Foverview","4.integrate\u002Fframeworks\u002F00.overview","i-lucide-layout-grid",{"title":240,"path":241,"stem":242,"icon":243},"Nuxt","\u002Fintegrate\u002Fframeworks\u002Fnuxt","4.integrate\u002Fframeworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":245,"path":246,"stem":247,"icon":248},"Next.js","\u002Fintegrate\u002Fframeworks\u002Fnextjs","4.integrate\u002Fframeworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":250,"path":251,"stem":252,"icon":253},"SvelteKit","\u002Fintegrate\u002Fframeworks\u002Fsveltekit","4.integrate\u002Fframeworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":255,"path":256,"stem":257,"icon":258},"Nitro","\u002Fintegrate\u002Fframeworks\u002Fnitro","4.integrate\u002Fframeworks\u002F04.nitro","i-custom-nitro",{"title":260,"path":261,"stem":262,"icon":263},"TanStack Start","\u002Fintegrate\u002Fframeworks\u002Ftanstack-start","4.integrate\u002Fframeworks\u002F05.tanstack-start","i-custom-tanstack",{"title":265,"path":266,"stem":267,"icon":268},"NestJS","\u002Fintegrate\u002Fframeworks\u002Fnestjs","4.integrate\u002Fframeworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":270,"path":271,"stem":272,"icon":273},"Express","\u002Fintegrate\u002Fframeworks\u002Fexpress","4.integrate\u002Fframeworks\u002F07.express","i-simple-icons-express",{"title":275,"path":276,"stem":277,"icon":278},"Hono","\u002Fintegrate\u002Fframeworks\u002Fhono","4.integrate\u002Fframeworks\u002F08.hono","i-simple-icons-hono",{"title":280,"path":281,"stem":282,"icon":283},"Fastify","\u002Fintegrate\u002Fframeworks\u002Ffastify","4.integrate\u002Fframeworks\u002F09.fastify","i-simple-icons-fastify",{"title":285,"path":286,"stem":287,"icon":288},"Elysia","\u002Fintegrate\u002Fframeworks\u002Felysia","4.integrate\u002Fframeworks\u002F10.elysia","i-custom-elysia",{"title":290,"path":291,"stem":292,"icon":293},"React Router","\u002Fintegrate\u002Fframeworks\u002Freact-router","4.integrate\u002Fframeworks\u002F11.react-router","i-custom-reactrouter",{"title":295,"path":296,"stem":297,"icon":298},"Cloudflare Workers","\u002Fintegrate\u002Fframeworks\u002Fcloudflare-workers","4.integrate\u002Fframeworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":300,"path":301,"stem":302,"icon":79},"Standalone","\u002Fintegrate\u002Fframeworks\u002Fstandalone","4.integrate\u002Fframeworks\u002F13.standalone",{"title":304,"path":305,"stem":306,"icon":307},"Astro","\u002Fintegrate\u002Fframeworks\u002Fastro","4.integrate\u002Fframeworks\u002F14.astro","i-simple-icons-astro",{"title":309,"path":310,"stem":311,"icon":312},"oRPC","\u002Fintegrate\u002Fframeworks\u002Forpc","4.integrate\u002Fframeworks\u002F15.orpc","i-lucide-network",{"title":314,"path":315,"stem":316,"icon":317},"AWS Lambda","\u002Fintegrate\u002Fframeworks\u002Faws-lambda","4.integrate\u002Fframeworks\u002F16.aws-lambda","i-custom-lambda",{"title":319,"path":320,"stem":321,"children":322,"page":34},"Use Cases","\u002Fuse-cases","5.use-cases",[323,326,331,359,386,418,439,444,449],{"title":41,"path":324,"stem":325,"icon":107},"\u002Fuse-cases\u002Foverview","5.use-cases\u002F0.overview",{"title":327,"path":328,"stem":329,"icon":330},"Client Logging","\u002Fuse-cases\u002Fclient-logging","5.use-cases\u002F1.client-logging","i-lucide-monitor",{"title":332,"icon":333,"path":334,"stem":335,"children":336,"page":34},"AI SDK","i-simple-icons-vercel","\u002Fuse-cases\u002Fai-sdk","5.use-cases\u002F2.ai-sdk",[337,340,345,350,355],{"title":41,"path":338,"stem":339,"icon":44},"\u002Fuse-cases\u002Fai-sdk\u002Foverview","5.use-cases\u002F2.ai-sdk\u002F01.overview",{"title":341,"path":342,"stem":343,"icon":344},"Usage","\u002Fuse-cases\u002Fai-sdk\u002Fusage","5.use-cases\u002F2.ai-sdk\u002F02.usage","i-lucide-code",{"title":346,"path":347,"stem":348,"icon":349},"Options","\u002Fuse-cases\u002Fai-sdk\u002Foptions","5.use-cases\u002F2.ai-sdk\u002F03.options","i-lucide-sliders",{"title":351,"path":352,"stem":353,"icon":354},"Metadata","\u002Fuse-cases\u002Fai-sdk\u002Fmetadata","5.use-cases\u002F2.ai-sdk\u002F04.metadata","i-lucide-database",{"title":356,"path":357,"stem":358,"icon":137},"Telemetry","\u002Fuse-cases\u002Fai-sdk\u002Ftelemetry","5.use-cases\u002F2.ai-sdk\u002F05.telemetry",{"title":360,"icon":361,"path":362,"stem":363,"children":364,"page":34},"Better Auth","i-simple-icons-betterauth","\u002Fuse-cases\u002Fbetter-auth","5.use-cases\u002F3.better-auth",[365,368,373,378,382],{"title":41,"path":366,"stem":367,"icon":44},"\u002Fuse-cases\u002Fbetter-auth\u002Foverview","5.use-cases\u002F3.better-auth\u002F01.overview",{"title":369,"path":370,"stem":371,"icon":372},"Identify User","\u002Fuse-cases\u002Fbetter-auth\u002Fidentify-user","5.use-cases\u002F3.better-auth\u002F02.identify-user","i-lucide-user-check",{"title":374,"path":375,"stem":376,"icon":377},"Middleware","\u002Fuse-cases\u002Fbetter-auth\u002Fmiddleware","5.use-cases\u002F3.better-auth\u002F03.middleware","i-lucide-shield",{"title":379,"path":380,"stem":381,"icon":330},"Client Sync","\u002Fuse-cases\u002Fbetter-auth\u002Fclient-sync","5.use-cases\u002F3.better-auth\u002F04.client-sync",{"title":383,"path":384,"stem":385,"icon":112},"Performance","\u002Fuse-cases\u002Fbetter-auth\u002Fperformance","5.use-cases\u002F3.better-auth\u002F05.performance",{"title":387,"icon":388,"path":389,"stem":390,"children":391,"page":34},"Audit Logs","i-lucide-shield-check","\u002Fuse-cases\u002Faudit","5.use-cases\u002F4.audit",[392,395,400,405,410,414],{"title":41,"path":393,"stem":394,"icon":44},"\u002Fuse-cases\u002Faudit\u002Foverview","5.use-cases\u002F4.audit\u002F01.overview",{"title":396,"path":397,"stem":398,"icon":399},"Schema","\u002Fuse-cases\u002Faudit\u002Fschema","5.use-cases\u002F4.audit\u002F02.schema","i-lucide-file-text",{"title":401,"path":402,"stem":403,"icon":404},"Recording","\u002Fuse-cases\u002Faudit\u002Frecording","5.use-cases\u002F4.audit\u002F03.recording","i-lucide-pen-line",{"title":406,"path":407,"stem":408,"icon":409},"Drains","\u002Fuse-cases\u002Faudit\u002Fpipeline","5.use-cases\u002F4.audit\u002F04.pipeline","i-lucide-link",{"title":411,"path":412,"stem":413,"icon":388},"Compliance","\u002Fuse-cases\u002Faudit\u002Fcompliance","5.use-cases\u002F4.audit\u002F05.compliance",{"title":415,"path":416,"stem":417,"icon":84},"Recipes","\u002Fuse-cases\u002Faudit\u002Frecipes","5.use-cases\u002F4.audit\u002F06.recipes",{"title":356,"icon":112,"path":419,"stem":420,"children":421,"page":34},"\u002Fuse-cases\u002Ftelemetry","5.use-cases\u002F4.telemetry",[422,425,430,435],{"title":41,"path":423,"stem":424,"icon":44},"\u002Fuse-cases\u002Ftelemetry\u002Foverview","5.use-cases\u002F4.telemetry\u002F01.overview",{"title":426,"path":427,"stem":428,"icon":429},"Setup","\u002Fuse-cases\u002Ftelemetry\u002Fsetup","5.use-cases\u002F4.telemetry\u002F02.setup","i-lucide-wrench",{"title":431,"path":432,"stem":433,"icon":434},"Ingest","\u002Fuse-cases\u002Ftelemetry\u002Fingest","5.use-cases\u002F4.telemetry\u002F03.ingest","i-lucide-server",{"title":436,"path":437,"stem":438,"icon":84},"Reference","\u002Fuse-cases\u002Ftelemetry\u002Freference","5.use-cases\u002F4.telemetry\u002F04.reference",{"title":440,"path":441,"stem":442,"icon":443},"Enrichers","\u002Fuse-cases\u002Fenrichers","5.use-cases\u002F5.enrichers","i-lucide-sparkles",{"title":445,"path":446,"stem":447,"icon":448},"eve","\u002Fuse-cases\u002Feve","5.use-cases\u002F5.eve","i-custom-eve",{"title":450,"path":451,"stem":452,"icon":434},"Node.js request logging","\u002Fuse-cases\u002Fstructured-logging-nodejs","5.use-cases\u002F6.structured-logging-nodejs",{"title":454,"path":455,"stem":456,"children":457,"page":34},"Libraries","\u002Flibraries","6.libraries",[458,462,467,470,474,479,484],{"title":41,"path":459,"stem":460,"icon":461},"\u002Flibraries\u002Foverview","6.libraries\u002F0.overview","i-lucide-package",{"title":463,"path":464,"stem":465,"icon":466},"Emitting Events","\u002Flibraries\u002Femitting","6.libraries\u002F1.emitting","i-lucide-radio",{"title":56,"path":468,"stem":469,"icon":59},"\u002Flibraries\u002Ferrors","6.libraries\u002F2.errors",{"title":471,"path":472,"stem":473,"icon":132},"Errors Agents Can Act On","\u002Flibraries\u002Fagents","6.libraries\u002F3.agents",{"title":475,"path":476,"stem":477,"icon":478},"Exporting the Catalog","\u002Flibraries\u002Fexporting","6.libraries\u002F4.exporting","i-lucide-file-output",{"title":480,"path":481,"stem":482,"icon":483},"Migrating","\u002Flibraries\u002Fmigrating","6.libraries\u002F5.migrating","i-lucide-route",{"title":485,"path":486,"stem":487,"icon":488},"Testing","\u002Flibraries\u002Ftesting","6.libraries\u002F6.testing","i-lucide-flask-conical",{"title":490,"path":491,"stem":492,"children":493,"page":34},"Extend","\u002Fextend","7.extend",[494,498,503,508,512,517,521,525,529,533,538,543],{"title":41,"path":495,"stem":496,"icon":497},"\u002Fextend\u002Foverview","7.extend\u002F0.overview","i-lucide-blocks",{"title":499,"path":500,"stem":501,"icon":502},"Stream","\u002Fextend\u002Fstream","7.extend\u002F1.stream","i-lucide-radio-tower",{"title":504,"path":505,"stem":506,"icon":507},"Custom framework","\u002Fextend\u002Fcustom-framework","7.extend\u002F10.custom-framework","i-lucide-puzzle",{"title":509,"path":510,"stem":511,"icon":502},"Diagnostics channel","\u002Fextend\u002Fdiagnostics-channel","7.extend\u002F11.diagnostics-channel",{"title":513,"path":514,"stem":515,"icon":516},"FS reader","\u002Fextend\u002Ffs-reader","7.extend\u002F2.fs-reader","i-lucide-folder-search",{"title":415,"path":518,"stem":519,"icon":520},"\u002Fextend\u002Fconsumer-recipes","7.extend\u002F3.consumer-recipes","i-lucide-chef-hat",{"title":522,"path":523,"stem":524,"icon":497},"Plugins","\u002Fextend\u002Fplugins","7.extend\u002F4.plugins",{"title":526,"path":527,"stem":528,"icon":443},"Custom enrichers","\u002Fextend\u002Fcustom-enrichers","7.extend\u002F5.custom-enrichers",{"title":530,"path":531,"stem":532,"icon":69},"Tail sampling","\u002Fextend\u002Ftail-sampling","7.extend\u002F6.tail-sampling",{"title":534,"path":535,"stem":536,"icon":537},"Identity headers","\u002Fextend\u002Fidentity-headers","7.extend\u002F7.identity-headers","i-lucide-fingerprint",{"title":539,"path":540,"stem":541,"icon":542},"Custom drains","\u002Fextend\u002Fcustom-drains","7.extend\u002F8.custom-drains","i-lucide-share-2",{"title":544,"path":545,"stem":546,"icon":547},"Drain pipeline","\u002Fextend\u002Fdrain-pipeline","7.extend\u002F9.drain-pipeline","i-lucide-workflow",{"title":436,"path":549,"stem":550,"children":551,"page":34},"\u002Freference","8.reference",[552,556,561,564,569,573,578,582],{"title":41,"path":553,"stem":554,"icon":555},"\u002Freference\u002Foverview","8.reference\u002F0.overview","i-lucide-book-marked",{"title":557,"path":558,"stem":559,"icon":560},"Configuration","\u002Freference\u002Fconfiguration","8.reference\u002F1.configuration","i-lucide-settings",{"title":383,"path":562,"stem":563,"icon":112},"\u002Freference\u002Fperformance","8.reference\u002F2.performance",{"title":565,"path":566,"stem":567,"icon":568},"Vite Plugin","\u002Freference\u002Fvite-plugin","8.reference\u002F3.vite-plugin","i-custom-vite",{"title":570,"path":571,"stem":572,"icon":388},"Best Practices","\u002Freference\u002Fbest-practices","8.reference\u002F4.best-practices",{"title":574,"path":575,"stem":576,"icon":577},"vs Other Loggers","\u002Freference\u002Fvs-other-loggers","8.reference\u002F5.vs-other-loggers","i-lucide-scale",{"title":579,"path":580,"stem":581,"icon":443},"Agent Skills","\u002Freference\u002Fagent-skills","8.reference\u002F6.agent-skills",{"title":583,"path":584,"stem":585,"icon":586},"Cost","\u002Freference\u002Fcost","8.reference\u002F7.cost","i-lucide-receipt",{"title":588,"path":589,"stem":590,"children":591,"page":34},"Compare","\u002Fcompare","9.compare",[592,596,600,604,608],{"title":593,"path":594,"stem":595,"icon":577},"evlog vs Pino","\u002Fcompare\u002Fpino","9.compare\u002F1.pino",{"title":597,"path":598,"stem":599,"icon":204},"evlog vs OpenTelemetry","\u002Fcompare\u002Fopentelemetry","9.compare\u002F2.opentelemetry",{"title":601,"path":602,"stem":603,"icon":577},"evlog vs LogTape","\u002Fcompare\u002Flogtape","9.compare\u002F3.logtape",{"title":605,"path":606,"stem":607,"icon":577},"evlog vs Winston: formats and request events","\u002Fcompare\u002Fwinston","9.compare\u002F4.winston",{"title":609,"path":610,"stem":611,"icon":577},"evlog vs Consola: reporters and request context","\u002Fcompare\u002Fconsola","9.compare\u002F5.consola",{"id":613,"title":454,"body":614,"description":1098,"extension":1099,"links":1100,"meta":1108,"navigation":1109,"path":459,"seo":1110,"stem":460,"__hash__":1111},"docs\u002F6.libraries\u002F0.overview.md",{"type":615,"value":616,"toc":1093},"minimark",[617,626,629,818,821,844,941,946,1034,1038,1050,1056,1060,1076,1089],[618,619,620,621,625],"p",{},"Your package throws ",[622,623,624],"code",{},"new Error('Not Found')"," when GitHub answers 404. The host catches a string. Its dashboard cannot count it, its support search cannot find it, and the agent that called your tool reads \"not found\" as \"the repository does not exist\" when the real cause is a token that cannot see a private repo. The agent retries with a different owner, fails again, opens your docs, and spends a few thousand tokens learning what one sentence in the error could have said.",[618,627,628],{},"A catalog puts that sentence in the error. This is what the two versions hand a consumer:",[630,631,632,695],"code-group",{},[633,634,640],"pre",{"className":635,"code":636,"filename":637,"language":638,"meta":639,"style":639},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","throw new Error('Not Found')\n\n\u002F\u002F what the host or the agent receives\n\u002F\u002F Error: Not Found\n","Before: a bare Error","typescript","",[622,641,642,675,682,689],{"__ignoreMap":639},[643,644,647,651,655,659,663,666,670,672],"span",{"class":645,"line":646},"line",1,[643,648,650],{"class":649},"s7zQu","throw",[643,652,654],{"class":653},"sMK4o"," new",[643,656,658],{"class":657},"s2Zo4"," Error",[643,660,662],{"class":661},"sTEyZ","(",[643,664,665],{"class":653},"'",[643,667,669],{"class":668},"sfazB","Not Found",[643,671,665],{"class":653},[643,673,674],{"class":661},")\n",[643,676,678],{"class":645,"line":677},2,[643,679,681],{"emptyLinePlaceholder":680},true,"\n",[643,683,685],{"class":645,"line":684},3,[643,686,688],{"class":687},"sHwdD","\u002F\u002F what the host or the agent receives\n",[643,690,692],{"class":645,"line":691},4,[643,693,694],{"class":687},"\u002F\u002F Error: Not Found\n",[633,696,699],{"className":635,"code":697,"filename":698,"language":638,"meta":639,"style":639},"throw githubToolsErrors.NOT_FOUND({ detail: 'Not Found' })\n\n\u002F\u002F what the host or the agent receives, via parseError() or the tool result\n\u002F\u002F {\n\u002F\u002F   code: 'github_tools.NOT_FOUND',\n\u002F\u002F   status: 404,\n\u002F\u002F   message: 'GitHub resource not found (404): Not Found',\n\u002F\u002F   why: 'Either the resource does not exist, or the token cannot see it.\n\u002F\u002F         GitHub deliberately returns 404 instead of 403 for private\n\u002F\u002F         resources the token has no access to.',\n\u002F\u002F   fix: 'Check the owner\u002Frepo\u002Fnumber input first. If it is correct,\n\u002F\u002F         the token lacks access: grant the repository to the PAT or\n\u002F\u002F         App installation, or use a Connect subject that has access.',\n\u002F\u002F   link: 'https:\u002F\u002Fdocs.github.com\u002F...\u002Ftroubleshooting-the-rest-api#404-not-found-for-an-existing-resource'\n\u002F\u002F }\n","After: a catalog error",[622,700,701,738,742,747,752,758,764,770,776,782,788,794,800,806,812],{"__ignoreMap":639},[643,702,703,705,708,711,714,716,719,723,726,729,731,733,736],{"class":645,"line":646},[643,704,650],{"class":649},[643,706,707],{"class":661}," githubToolsErrors",[643,709,710],{"class":653},".",[643,712,713],{"class":657},"NOT_FOUND",[643,715,662],{"class":661},[643,717,718],{"class":653},"{",[643,720,722],{"class":721},"swJcz"," detail",[643,724,725],{"class":653},":",[643,727,728],{"class":653}," '",[643,730,669],{"class":668},[643,732,665],{"class":653},[643,734,735],{"class":653}," }",[643,737,674],{"class":661},[643,739,740],{"class":645,"line":677},[643,741,681],{"emptyLinePlaceholder":680},[643,743,744],{"class":645,"line":684},[643,745,746],{"class":687},"\u002F\u002F what the host or the agent receives, via parseError() or the tool result\n",[643,748,749],{"class":645,"line":691},[643,750,751],{"class":687},"\u002F\u002F {\n",[643,753,755],{"class":645,"line":754},5,[643,756,757],{"class":687},"\u002F\u002F   code: 'github_tools.NOT_FOUND',\n",[643,759,761],{"class":645,"line":760},6,[643,762,763],{"class":687},"\u002F\u002F   status: 404,\n",[643,765,767],{"class":645,"line":766},7,[643,768,769],{"class":687},"\u002F\u002F   message: 'GitHub resource not found (404): Not Found',\n",[643,771,773],{"class":645,"line":772},8,[643,774,775],{"class":687},"\u002F\u002F   why: 'Either the resource does not exist, or the token cannot see it.\n",[643,777,779],{"class":645,"line":778},9,[643,780,781],{"class":687},"\u002F\u002F         GitHub deliberately returns 404 instead of 403 for private\n",[643,783,785],{"class":645,"line":784},10,[643,786,787],{"class":687},"\u002F\u002F         resources the token has no access to.',\n",[643,789,791],{"class":645,"line":790},11,[643,792,793],{"class":687},"\u002F\u002F   fix: 'Check the owner\u002Frepo\u002Fnumber input first. If it is correct,\n",[643,795,797],{"class":645,"line":796},12,[643,798,799],{"class":687},"\u002F\u002F         the token lacks access: grant the repository to the PAT or\n",[643,801,803],{"class":645,"line":802},13,[643,804,805],{"class":687},"\u002F\u002F         App installation, or use a Connect subject that has access.',\n",[643,807,809],{"class":645,"line":808},14,[643,810,811],{"class":687},"\u002F\u002F   link: 'https:\u002F\u002Fdocs.github.com\u002F...\u002Ftroubleshooting-the-rest-api#404-not-found-for-an-existing-resource'\n",[643,813,815],{"class":645,"line":814},15,[643,816,817],{"class":687},"\u002F\u002F }\n",[618,819,820],{},"The second error is the same 404. It costs the consumer one read instead of a loop, and it costs you the four sentences you would otherwise write in a support reply.",[822,823,826,827,830,831,840,841,710],"callout",{"color":824,"icon":825},"neutral","i-lucide-github","The ",[622,828,829],{},"github_tools"," examples in this section come from ",[832,833,837],"a",{"href":834,"rel":835},"https:\u002F\u002Fgithub.com\u002Fvercel-labs\u002Fgithub-tools",[836],"nofollow",[622,838,839],{},"@github-tools\u002Fsdk",", a typed GitHub tool layer for AI agents that ships an evlog catalog of eleven errors. It is a real package with real consumers, so its entries show what a catalog looks like after contact with production. Where a page needs a generic scaffold instead, it uses ",[622,842,843],{},"mylib",[845,846,849,852,934],"prompt",{":actions":847,"description":848,"icon":461},"[\"copy\",\"cursor\",\"claude\"]","Add evlog to my library or SDK",[618,850,851],{},"Set up evlog in an npm library that runs inside host applications.",[853,854,855,879,889,892,903,914,921,924],"ul",{},[856,857,858,859,862,863,866,867,870,871,874,875,878],"li",{},"Ship errors as a ",[622,860,861],{},"defineErrorCatalog()"," with a prefix the package owns (e.g. ",[622,864,865],{},"mylib.RATE_LIMITED","). Every entry carries ",[622,868,869],{},"why"," (the technical cause, including the non-obvious one), ",[622,872,873],{},"fix"," (an imperative a person or an agent can execute), and ",[622,876,877],{},"link"," (a stable docs anchor)",[856,880,881,882,885,886],{},"Wrap upstream failures into catalog errors with ",[622,883,884],{},"cause"," set to the original and request coordinates in ",[622,887,888],{},"internal",[856,890,891],{},"Treat catalog codes as wire format: additive changes only, deprecate before removing",[856,893,894,895,898,899,902],{},"Declare ",[622,896,897],{},"evlog"," as a peer dependency pinned to one major, never call ",[622,900,901],{},"initLogger()",": the host owns drains, sampling, and redaction",[856,904,905,906,909,910,913],{},"Emit with the global ",[622,907,908],{},"log"," API or ",[622,911,912],{},"createLogger()",", always with the package name in a field the host can filter on",[856,915,916,917,920],{},"Inside a host request handler, accept the request logger as an ",[622,918,919],{},"AuditableLogger"," parameter instead of creating one",[856,922,923],{},"Generate an error reference (Markdown and JSON) from the catalog and publish it with the docs",[856,925,926,927,930,931],{},"In tests, collect events with a drain function or ",[622,928,929],{},"evlog\u002Fmemory",", and assert error codes through ",[622,932,933],{},"factory.code",[618,935,936,937],{},"Start: ",[832,938,939],{"href":939,"rel":940},"https:\u002F\u002Fwww.evlog.dev\u002Flibraries\u002Foverview",[836],[942,943,945],"h2",{"id":944},"what-this-section-answers","What this section answers",[947,948,949,962],"table",{},[950,951,952],"thead",{},[953,954,955,959],"tr",{},[956,957,958],"th",{},"You are about to…",[956,960,961],{},"Read",[963,964,965,975,988,1003,1016,1025],"tbody",{},[953,966,967,971],{},[968,969,970],"td",{},"Log from library code without stealing the host's configuration",[968,972,973],{},[832,974,463],{"href":464},[953,976,977,984],{},[968,978,979,980,983],{},"Replace ",[622,981,982],{},"throw new Error()"," with a catalog the host can route",[968,985,986],{},[832,987,56],{"href":468},[953,989,990,999],{},[968,991,992,993,995,996,998],{},"Write ",[622,994,869],{}," and ",[622,997,873],{}," so an agent recovers without opening your docs",[968,1000,1001],{},[832,1002,471],{"href":472},[953,1004,1005,1012],{},[968,1006,1007,1008,1011],{},"Turn the catalog into a reference page, a JSON file, and an ",[622,1009,1010],{},"llms.txt"," section",[968,1013,1014],{},[832,1015,475],{"href":476},[953,1017,1018,1021],{},[968,1019,1020],{},"Convert an existing package with thirty bare throws, in order",[968,1022,1023],{},[832,1024,480],{"href":481},[953,1026,1027,1030],{},[968,1028,1029],{},"Stop a renamed code or field from breaking a host silently",[968,1031,1032],{},[832,1033,485],{"href":486},[942,1035,1037],{"id":1036},"the-contract","The contract",[618,1039,1040,1041,1043,1044,1046,1047,710],{},"Your package emits. The host configures. Where events go, which ones survive sampling, and what gets redacted is decided by the application's ",[622,1042,901],{}," call, and library code never makes that call: ",[622,1045,901],{}," writes process-wide state shared by every evlog copy of the same major, and the last call wins. A library that calls it at import time replaces the host's drain for the whole process with a single ",[622,1048,1049],{},"require",[618,1051,1052,1053,1055],{},"That one rule settles the decisions on ",[832,1054,463],{"href":464},": which API you use, where the package name goes, and why a library accepts a request logger as a parameter instead of building one. Nothing on the error pages touches configuration: a catalog is a module of factories, and throwing one is what makes the host's pipeline useful.",[942,1057,1059],{"id":1058},"what-it-costs","What it costs",[618,1061,1062,1064,1065,995,1067,1069,1070,1072,1073,1075],{},[622,1063,897],{}," becomes a peer dependency of your package, so a host that never installed it gets one more install. The process shares one configuration per evlog major, so you pin your peer range to a single major and document it. Each catalog entry is four sentences you maintain: the ",[622,1066,869],{},[622,1068,873],{}," go stale when the upstream API changes, and a wrong ",[622,1071,873],{}," misleads an agent faster than no ",[622,1074,873],{}," at all. And the emit-only contract is a real constraint: your package cannot route its own events anywhere, which is the point.",[618,1077,1078,1079,1081,1082,1085,1086,1088],{},"For the API underneath this section, ",[832,1080,56],{"href":57}," covers ",[622,1083,1084],{},"createError"," and catalogs as an application uses them, and ",[832,1087,51],{"href":52}," covers the event model.",[1090,1091,1092],"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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}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 .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 .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 .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}",{"title":639,"searchDepth":677,"depth":677,"links":1094},[1095,1096,1097],{"id":944,"depth":677,"text":945},{"id":1036,"depth":677,"text":1037},{"id":1058,"depth":677,"text":1059},"Ship evlog inside an npm package so every host, and every agent calling it, gets errors with a code, a cause, and a fix instead of a string.","md",[1101,1103,1104,1105,1106,1107],{"label":463,"icon":466,"to":464,"color":824,"variant":1102},"subtle",{"label":56,"icon":59,"to":468,"color":824,"variant":1102},{"label":471,"icon":132,"to":472,"color":824,"variant":1102},{"label":475,"icon":478,"to":476,"color":824,"variant":1102},{"label":480,"icon":483,"to":481,"color":824,"variant":1102},{"label":485,"icon":488,"to":486,"color":824,"variant":1102},{},{"title":41,"icon":461},{"title":454,"description":1098},"qn28L38LwBzi-teAnGDtmeNCNnjMY9_NaAftxvya79I",[1113,1115],{"title":450,"path":451,"stem":452,"description":1114,"icon":434,"children":-1},"Build a Node.js HTTP handler with structured request logs, explicit outcomes, error context, and a JSON event you can query.",{"title":463,"path":464,"stem":465,"description":1116,"icon":466,"children":-1},"Emit events from library code the host can attribute and filter: join the host's request, tag your own events, and stay out of the configuration.",1789294024397]