[{"data":1,"prerenderedAt":1303},["ShallowReactive",2],{"navigation_docs":3,"-libraries-emitting":612,"-libraries-emitting-surround":1298},[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":463,"body":614,"description":1291,"extension":1292,"links":1293,"meta":1294,"navigation":1295,"path":464,"seo":1296,"stem":465,"__hash__":1297},"docs\u002F6.libraries\u002F1.emitting.md",{"type":615,"value":616,"toc":1285},"minimark",[617,621,626,629,792,811,818,831,835,841,982,993,1000,1150,1162,1166,1178,1184,1240,1244,1247,1270,1281],[618,619,620],"p",{},"Your package runs inside someone else's process. When it logs, the events land in the host's stream, pass through the host's redaction, and reach whatever drains the host configured. Three situations cover what a library emits: running inside a host request, running on its own (a CLI, a job, a script), and a dependency graph with more than one copy of evlog in it. The first is the one most packages hit first.",[622,623,625],"h2",{"id":624},"join-the-hosts-request-when-you-run-inside-one","Join the host's request when you run inside one",[618,627,628],{},"Inside a host application, the framework integration already builds one wide event per request and emits it at the end of the lifecycle. A package that creates its own logger during a request forks that into two unrelated events, and the host loses the connection between its handler and your code. Instead, accept the request logger as a parameter and add your context to the event the host already owns:",[630,631,637],"pre",{"className":632,"code":633,"filename":634,"language":635,"meta":636,"style":636},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import type { AuditableLogger } from 'evlog'\n\nexport function chargePayment(log: AuditableLogger, amount: number): void {\n  log.set({ payment: { amount, provider: 'stripe' } })\n  \u002F\u002F ...\n}\n","src\u002Fcheckout.ts","typescript","",[638,639,640,676,683,730,779,786],"code",{"__ignoreMap":636},[641,642,645,649,652,656,660,663,666,669,673],"span",{"class":643,"line":644},"line",1,[641,646,648],{"class":647},"s7zQu","import",[641,650,651],{"class":647}," type",[641,653,655],{"class":654},"sMK4o"," {",[641,657,659],{"class":658},"sTEyZ"," AuditableLogger",[641,661,662],{"class":654}," }",[641,664,665],{"class":647}," from",[641,667,668],{"class":654}," '",[641,670,672],{"class":671},"sfazB","evlog",[641,674,675],{"class":654},"'\n",[641,677,679],{"class":643,"line":678},2,[641,680,682],{"emptyLinePlaceholder":681},true,"\n",[641,684,686,689,693,697,700,704,707,710,713,716,718,721,724,727],{"class":643,"line":685},3,[641,687,688],{"class":647},"export",[641,690,692],{"class":691},"spNyl"," function",[641,694,696],{"class":695},"s2Zo4"," chargePayment",[641,698,699],{"class":654},"(",[641,701,703],{"class":702},"sHdIc","log",[641,705,706],{"class":654},":",[641,708,659],{"class":709},"sBMFI",[641,711,712],{"class":654},",",[641,714,715],{"class":702}," amount",[641,717,706],{"class":654},[641,719,720],{"class":709}," number",[641,722,723],{"class":654},"):",[641,725,726],{"class":709}," void",[641,728,729],{"class":654}," {\n",[641,731,733,736,739,742,745,748,751,753,755,757,759,762,764,766,769,772,774,776],{"class":643,"line":732},4,[641,734,735],{"class":658},"  log",[641,737,738],{"class":654},".",[641,740,741],{"class":695},"set",[641,743,699],{"class":744},"swJcz",[641,746,747],{"class":654},"{",[641,749,750],{"class":744}," payment",[641,752,706],{"class":654},[641,754,655],{"class":654},[641,756,715],{"class":658},[641,758,712],{"class":654},[641,760,761],{"class":744}," provider",[641,763,706],{"class":654},[641,765,668],{"class":654},[641,767,768],{"class":671},"stripe",[641,770,771],{"class":654},"'",[641,773,662],{"class":654},[641,775,662],{"class":654},[641,777,778],{"class":744},")\n",[641,780,782],{"class":643,"line":781},5,[641,783,785],{"class":784},"sHwdD","  \u002F\u002F ...\n",[641,787,789],{"class":643,"line":788},6,[641,790,791],{"class":654},"}\n",[618,793,794,795,798,799,802,803,806,807,810],{},"The host resolves the request logger with ",[638,796,797],{},"useLogger()"," from the framework subpath it uses (",[638,800,801],{},"evlog\u002Fhono",", ",[638,804,805],{},"evlog\u002Fnext",", ...) or with the framework-native accessor, then passes it to your package. Every ",[638,808,809],{},"log.set()"," you call merges into the request's wide event, so the host sees the whole operation in one place: its handler, your call, and the error if one happened.",[618,812,813,814,817],{},"Design your API so the logger stays optional: ",[638,815,816],{},"chargePayment(log, amount)"," where the host passes what it has. A package that quietly reaches for an ambient logger cannot run inside a queue worker or a script, and the host has no way to hand you the request logger you skipped.",[819,820,822,823,826,827,830],"callout",{"color":821,"icon":13},"info","Request loggers from some framework integrations also carry ",[638,824,825],{},"log.fork()"," for background work that needs its own event, correlated with the parent request. Integrations attach it when they run a logger storage (Hono, oRPC, Express, Fastify, NestJS, SvelteKit, React Router, Next.js, Elysia); Nitro and Nuxt do not attach it yet. A standalone ",[638,828,829],{},"createLogger()"," instance never has it.",[622,832,834],{"id":833},"emit-your-own-events-when-there-is-no-request","Emit your own events when there is no request",[618,836,837,838,840],{},"A CLI command, a sync job, or a script has no host request to join. Use the global ",[638,839,703],{}," API for progress, and keep your package name in a field so the host can filter on it:",[630,842,845],{"className":632,"code":843,"filename":844,"language":635,"meta":636,"style":636},"import { log } from 'evlog'\n\nexport class ApiClient {\n  async request(path: string): Promise\u003CResponse> {\n    log.info({ source: 'mylib.client', message: `GET ${path}` })\n    \u002F\u002F ...\n  }\n}\n","src\u002Fclient.ts",[638,846,847,866,870,882,916,966,971,977],{"__ignoreMap":636},[641,848,849,851,853,856,858,860,862,864],{"class":643,"line":644},[641,850,648],{"class":647},[641,852,655],{"class":654},[641,854,855],{"class":658}," log",[641,857,662],{"class":654},[641,859,665],{"class":647},[641,861,668],{"class":654},[641,863,672],{"class":671},[641,865,675],{"class":654},[641,867,868],{"class":643,"line":678},[641,869,682],{"emptyLinePlaceholder":681},[641,871,872,874,877,880],{"class":643,"line":685},[641,873,688],{"class":647},[641,875,876],{"class":691}," class",[641,878,879],{"class":709}," ApiClient",[641,881,729],{"class":654},[641,883,884,887,890,892,895,897,900,902,905,908,911,914],{"class":643,"line":732},[641,885,886],{"class":691},"  async",[641,888,889],{"class":744}," request",[641,891,699],{"class":654},[641,893,894],{"class":702},"path",[641,896,706],{"class":654},[641,898,899],{"class":709}," string",[641,901,723],{"class":654},[641,903,904],{"class":709}," Promise",[641,906,907],{"class":654},"\u003C",[641,909,910],{"class":709},"Response",[641,912,913],{"class":654},">",[641,915,729],{"class":654},[641,917,918,921,923,925,927,929,932,934,936,939,941,943,946,948,951,954,957,959,962,964],{"class":643,"line":781},[641,919,920],{"class":658},"    log",[641,922,738],{"class":654},[641,924,821],{"class":695},[641,926,699],{"class":744},[641,928,747],{"class":654},[641,930,931],{"class":744}," source",[641,933,706],{"class":654},[641,935,668],{"class":654},[641,937,938],{"class":671},"mylib.client",[641,940,771],{"class":654},[641,942,712],{"class":654},[641,944,945],{"class":744}," message",[641,947,706],{"class":654},[641,949,950],{"class":654}," `",[641,952,953],{"class":671},"GET ",[641,955,956],{"class":654},"${",[641,958,894],{"class":658},[641,960,961],{"class":654},"}`",[641,963,662],{"class":654},[641,965,778],{"class":744},[641,967,968],{"class":643,"line":788},[641,969,970],{"class":784},"    \u002F\u002F ...\n",[641,972,974],{"class":643,"line":973},7,[641,975,976],{"class":654},"  }\n",[641,978,980],{"class":643,"line":979},8,[641,981,791],{"class":654},[618,983,984,985,988,989,992],{},"It works whether or not the host configured evlog: without configuration it prints, pretty in development and JSON otherwise. The first segment of ",[638,986,987],{},"source"," is your package name and stays stable across releases. Treat it as a public identifier: hosts filter on it, and ",[990,991,485],"a",{"href":486}," shows how to lock it down.",[618,994,995,996,999],{},"When an operation deserves one wide event instead of individual messages, build it with ",[638,997,998],{},"createLogger"," and put the package name in the same field:",[630,1001,1004],{"className":632,"code":1002,"filename":1003,"language":635,"meta":636,"style":636},"import { createLogger } from 'evlog'\n\nexport function syncRecords(records: number): void {\n  const log = createLogger({ source: 'mylib', operation: 'sync-records' })\n  log.set({ records: { total: records } })\n  \u002F\u002F ...\n  log.emit()\n}\n","src\u002Fsync.ts",[638,1005,1006,1025,1029,1053,1098,1130,1134,1146],{"__ignoreMap":636},[641,1007,1008,1010,1012,1015,1017,1019,1021,1023],{"class":643,"line":644},[641,1009,648],{"class":647},[641,1011,655],{"class":654},[641,1013,1014],{"class":658}," createLogger",[641,1016,662],{"class":654},[641,1018,665],{"class":647},[641,1020,668],{"class":654},[641,1022,672],{"class":671},[641,1024,675],{"class":654},[641,1026,1027],{"class":643,"line":678},[641,1028,682],{"emptyLinePlaceholder":681},[641,1030,1031,1033,1035,1038,1040,1043,1045,1047,1049,1051],{"class":643,"line":685},[641,1032,688],{"class":647},[641,1034,692],{"class":691},[641,1036,1037],{"class":695}," syncRecords",[641,1039,699],{"class":654},[641,1041,1042],{"class":702},"records",[641,1044,706],{"class":654},[641,1046,720],{"class":709},[641,1048,723],{"class":654},[641,1050,726],{"class":709},[641,1052,729],{"class":654},[641,1054,1055,1058,1060,1063,1065,1067,1069,1071,1073,1075,1078,1080,1082,1085,1087,1089,1092,1094,1096],{"class":643,"line":732},[641,1056,1057],{"class":691},"  const",[641,1059,855],{"class":658},[641,1061,1062],{"class":654}," =",[641,1064,1014],{"class":695},[641,1066,699],{"class":744},[641,1068,747],{"class":654},[641,1070,931],{"class":744},[641,1072,706],{"class":654},[641,1074,668],{"class":654},[641,1076,1077],{"class":671},"mylib",[641,1079,771],{"class":654},[641,1081,712],{"class":654},[641,1083,1084],{"class":744}," operation",[641,1086,706],{"class":654},[641,1088,668],{"class":654},[641,1090,1091],{"class":671},"sync-records",[641,1093,771],{"class":654},[641,1095,662],{"class":654},[641,1097,778],{"class":744},[641,1099,1100,1102,1104,1106,1108,1110,1113,1115,1117,1120,1122,1124,1126,1128],{"class":643,"line":781},[641,1101,735],{"class":658},[641,1103,738],{"class":654},[641,1105,741],{"class":695},[641,1107,699],{"class":744},[641,1109,747],{"class":654},[641,1111,1112],{"class":744}," records",[641,1114,706],{"class":654},[641,1116,655],{"class":654},[641,1118,1119],{"class":744}," total",[641,1121,706],{"class":654},[641,1123,1112],{"class":658},[641,1125,662],{"class":654},[641,1127,662],{"class":654},[641,1129,778],{"class":744},[641,1131,1132],{"class":643,"line":788},[641,1133,785],{"class":784},[641,1135,1136,1138,1140,1143],{"class":643,"line":973},[641,1137,735],{"class":658},[641,1139,738],{"class":654},[641,1141,1142],{"class":695},"emit",[641,1144,1145],{"class":744},"()\n",[641,1147,1148],{"class":643,"line":979},[641,1149,791],{"class":654},[618,1151,1152,1154,1155,1158,1159,1161],{},[638,1153,987],{}," is a convention, not an API: pick one field name and document it in your package's README. If your fields benefit from compile-time checking, type the context with ",[638,1156,1157],{},"createLogger\u003CSyncContext>()","; ",[990,1160,76],{"href":77}," covers the patterns.",[622,1163,1165],{"id":1164},"never-configure-from-library-code","Never configure from library code",[819,1167,1170,1171,1174,1175,1177],{"color":1168,"icon":1169},"warning","i-lucide-alert-triangle","Never call ",[638,1172,1173],{},"initLogger()"," from library code, and configure nothing at import time. ",[638,1176,1173],{}," writes process-wide state shared by every evlog copy of the same major version, and the last call wins. A library that calls it replaces the host's drain, sampling, and redaction for the whole process, on a path the host's own code never executed.",[618,1179,1180,1181,1183],{},"Declare ",[638,1182,672],{}," as a peer dependency pinned to a single major, so your package and the host resolve compatible copies:",[630,1185,1190],{"className":1186,"code":1187,"filename":1188,"language":1189,"meta":636,"style":636},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"peerDependencies\": {\n    \"evlog\": \"^2.0.0\"\n  }\n}\n","package.json","json",[638,1191,1192,1197,1212,1232,1236],{"__ignoreMap":636},[641,1193,1194],{"class":643,"line":644},[641,1195,1196],{"class":654},"{\n",[641,1198,1199,1202,1205,1208,1210],{"class":643,"line":678},[641,1200,1201],{"class":654},"  \"",[641,1203,1204],{"class":691},"peerDependencies",[641,1206,1207],{"class":654},"\"",[641,1209,706],{"class":654},[641,1211,729],{"class":654},[641,1213,1214,1217,1219,1221,1223,1226,1229],{"class":643,"line":685},[641,1215,1216],{"class":654},"    \"",[641,1218,672],{"class":709},[641,1220,1207],{"class":654},[641,1222,706],{"class":654},[641,1224,1225],{"class":654}," \"",[641,1227,1228],{"class":671},"^2.0.0",[641,1230,1231],{"class":654},"\"\n",[641,1233,1234],{"class":643,"line":732},[641,1235,976],{"class":654},[641,1237,1238],{"class":643,"line":781},[641,1239,791],{"class":654},[622,1241,1243],{"id":1242},"gotchas","Gotchas",[618,1245,1246],{},"Two behaviors are reference material rather than design decisions, and both bite once.",[618,1248,1249,1253,1254,1257,1258,1261,1262,1265,1266,1269],{},[1250,1251,1252],"strong",{},"The tagged form skips the drain in development."," ",[638,1255,1256],{},"log.info({ source, message })",", the object form, always becomes a wide event through the host's pipeline: sampled, redacted, and delivered to the drain the host configured. ",[638,1259,1260],{},"log.info('mylib.client', 'GET \u002Fusers')",", the tagged form, prints through the host's pretty printer when pretty is on (the development default) and reaches neither a drain nor redaction there; in JSON mode it becomes a small wide event carrying ",[638,1263,1264],{},"tag"," and ",[638,1267,1268],{},"message",". If the host may be draining, use the object form.",[618,1271,1272,1275,1276,1278,1279,738],{},[1250,1273,1274],{},"More than one copy of evlog can exist in the graph."," Package managers hash optional peers differently across workspaces, so your package and the host can resolve different physical copies. Every 2.x copy registers the same process-wide slot, so an ",[638,1277,1173],{}," from the host's copy configures yours too, and your emits flow through the host's drains. Two different majors in one process is the case evlog cannot fix: they cannot share request scope or configuration, events emitted through the other copy are undrained and unredacted, and evlog prints a warning when the second major registers. Deduplicate the graph to a single major when that warning appears; nothing in your package code changes. For errors, duplicate copies also change how the host catches yours, covered on ",[990,1280,56],{"href":468},[1282,1283,1284],"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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}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);}",{"title":636,"searchDepth":678,"depth":678,"links":1286},[1287,1288,1289,1290],{"id":624,"depth":678,"text":625},{"id":833,"depth":678,"text":834},{"id":1164,"depth":678,"text":1165},{"id":1242,"depth":678,"text":1243},"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.","md",null,{},{"title":463,"icon":466},{"title":463,"description":1291},"120a2bAUgSRw2Pr46ZUzxRtxHo-_ejQKbUitax9N_CA",[1299,1301],{"title":41,"path":459,"stem":460,"description":1300,"icon":461,"children":-1},"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.",{"title":56,"path":468,"stem":469,"description":1302,"icon":59,"children":-1},"Replace bare errors with a catalog your package owns: what the host receives, how upstream failures map into it, and why codes are wire format.",1789294039260]