[{"data":1,"prerenderedAt":2149},["ShallowReactive",2],{"navigation_docs":3,"-extend-stream":598,"-extend-stream-surround":2144},[4,35,85,138,318,453,475,534,573],{"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],{"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":474},"Testing","\u002Flibraries\u002Ftesting","6.libraries\u002F3.testing","i-lucide-flask-conical",{"title":476,"path":477,"stem":478,"children":479,"page":34},"Extend","\u002Fextend","7.extend",[480,484,489,494,498,503,507,511,515,519,524,529],{"title":41,"path":481,"stem":482,"icon":483},"\u002Fextend\u002Foverview","7.extend\u002F0.overview","i-lucide-blocks",{"title":485,"path":486,"stem":487,"icon":488},"Stream","\u002Fextend\u002Fstream","7.extend\u002F1.stream","i-lucide-radio-tower",{"title":490,"path":491,"stem":492,"icon":493},"Custom framework","\u002Fextend\u002Fcustom-framework","7.extend\u002F10.custom-framework","i-lucide-puzzle",{"title":495,"path":496,"stem":497,"icon":488},"Diagnostics channel","\u002Fextend\u002Fdiagnostics-channel","7.extend\u002F11.diagnostics-channel",{"title":499,"path":500,"stem":501,"icon":502},"FS reader","\u002Fextend\u002Ffs-reader","7.extend\u002F2.fs-reader","i-lucide-folder-search",{"title":415,"path":504,"stem":505,"icon":506},"\u002Fextend\u002Fconsumer-recipes","7.extend\u002F3.consumer-recipes","i-lucide-chef-hat",{"title":508,"path":509,"stem":510,"icon":483},"Plugins","\u002Fextend\u002Fplugins","7.extend\u002F4.plugins",{"title":512,"path":513,"stem":514,"icon":443},"Custom enrichers","\u002Fextend\u002Fcustom-enrichers","7.extend\u002F5.custom-enrichers",{"title":516,"path":517,"stem":518,"icon":69},"Tail sampling","\u002Fextend\u002Ftail-sampling","7.extend\u002F6.tail-sampling",{"title":520,"path":521,"stem":522,"icon":523},"Identity headers","\u002Fextend\u002Fidentity-headers","7.extend\u002F7.identity-headers","i-lucide-fingerprint",{"title":525,"path":526,"stem":527,"icon":528},"Custom drains","\u002Fextend\u002Fcustom-drains","7.extend\u002F8.custom-drains","i-lucide-share-2",{"title":530,"path":531,"stem":532,"icon":533},"Drain pipeline","\u002Fextend\u002Fdrain-pipeline","7.extend\u002F9.drain-pipeline","i-lucide-workflow",{"title":436,"path":535,"stem":536,"children":537,"page":34},"\u002Freference","8.reference",[538,542,547,550,555,559,564,568],{"title":41,"path":539,"stem":540,"icon":541},"\u002Freference\u002Foverview","8.reference\u002F0.overview","i-lucide-book-marked",{"title":543,"path":544,"stem":545,"icon":546},"Configuration","\u002Freference\u002Fconfiguration","8.reference\u002F1.configuration","i-lucide-settings",{"title":383,"path":548,"stem":549,"icon":112},"\u002Freference\u002Fperformance","8.reference\u002F2.performance",{"title":551,"path":552,"stem":553,"icon":554},"Vite Plugin","\u002Freference\u002Fvite-plugin","8.reference\u002F3.vite-plugin","i-custom-vite",{"title":556,"path":557,"stem":558,"icon":388},"Best Practices","\u002Freference\u002Fbest-practices","8.reference\u002F4.best-practices",{"title":560,"path":561,"stem":562,"icon":563},"vs Other Loggers","\u002Freference\u002Fvs-other-loggers","8.reference\u002F5.vs-other-loggers","i-lucide-scale",{"title":565,"path":566,"stem":567,"icon":443},"Agent Skills","\u002Freference\u002Fagent-skills","8.reference\u002F6.agent-skills",{"title":569,"path":570,"stem":571,"icon":572},"Cost","\u002Freference\u002Fcost","8.reference\u002F7.cost","i-lucide-receipt",{"title":574,"path":575,"stem":576,"children":577,"page":34},"Compare","\u002Fcompare","9.compare",[578,582,586,590,594],{"title":579,"path":580,"stem":581,"icon":563},"evlog vs Pino","\u002Fcompare\u002Fpino","9.compare\u002F1.pino",{"title":583,"path":584,"stem":585,"icon":204},"evlog vs OpenTelemetry","\u002Fcompare\u002Fopentelemetry","9.compare\u002F2.opentelemetry",{"title":587,"path":588,"stem":589,"icon":563},"evlog vs LogTape","\u002Fcompare\u002Flogtape","9.compare\u002F3.logtape",{"title":591,"path":592,"stem":593,"icon":563},"evlog vs Winston: formats and request events","\u002Fcompare\u002Fwinston","9.compare\u002F4.winston",{"title":595,"path":596,"stem":597,"icon":563},"evlog vs Consola: reporters and request context","\u002Fcompare\u002Fconsola","9.compare\u002F5.consola",{"id":599,"title":485,"body":600,"description":2137,"extension":2138,"links":2139,"meta":2140,"navigation":2141,"path":486,"seo":2142,"stem":487,"__hash__":2143},"docs\u002F7.extend\u002F1.stream.md",{"type":601,"value":602,"toc":2124},"minimark",[603,612,636,651,655,658,663,740,1059,1063,1150,1159,1163,1166,1175,1181,1250,1254,1260,1298,1301,1305,1574,1587,1591,1594,1610,1613,1685,1688,1743,1747,1753,1841,2007,2011,2103,2107,2120],[604,605,606,607,611],"p",{},"evlog ships a ",[608,609,610],"strong",{},"stream primitive"," so any local consumer can subscribe to wide events without re-implementing a drain. There are two layers, building on each other:",[613,614,615,627],"ul",{},[616,617,618,621,622,626],"li",{},[608,619,620],{},"In-process bus",": ",[623,624,625],"code",{},"createStreamDrain()",", the canonical pub\u002Fsub. Sync listeners, async iterators, ring-buffered replay.",[616,628,629,621,632,635],{},[608,630,631],{},"Network bridge",[623,633,634],{},"startStreamServer()",", an opt-in HTTP mini-server that exposes the in-process bus over Server-Sent Events for browsers, CLIs, or external devtools.",[637,638,639,642,643,646,647,650],"callout",{"icon":377},[608,640,641],{},"Local-only by design."," Both layers live inside a single Node \u002F Bun \u002F Deno process. They work in ",[623,644,645],{},"pnpm dev",", on long-lived self-hosted servers, on VMs and containers (Fly, Railway, Coolify…). They do ",[608,648,649],{},"not"," work on serverless platforms (Vercel Functions, Cloudflare Workers, AWS Lambda), each invocation is an isolated process. Use a real broker (Redis Streams, NATS, Pub\u002FSub) for cross-instance fan-out there.",[652,653,620],"h2",{"id":654},"in-process-bus",[656,657],"stream-bus",{},[604,659,660,662],{},[623,661,625],{}," is just a drain. Register it on the evlog drain hook and subscribe to events as they're emitted: no HTTP, no serialization, no extra hops.",[664,665,668,671,731],"prompt",{":actions":666,"description":667,"icon":488},"[\"copy\",\"cursor\",\"claude\"]","Subscribe to wide events in-process",[604,669,670],{},"Wire an in-process subscriber on top of evlog's stream drain.",[613,672,673,684,699,710,717,728],{},[616,674,675,676,679,680,683],{},"Import ",[623,677,678],{},"createStreamDrain"," from ",[623,681,682],{},"evlog\u002Fstream"," and call it once at app boot",[616,685,686,687,690,691,694,695,698],{},"Register the returned ",[623,688,689],{},"drain"," on the evlog drain hook for my framework (Nitro: ",[623,692,693],{},"nitroApp.hooks.hook('evlog:drain', stream.drain)","; Next\u002Fstandalone: pass to ",[623,696,697],{},"initLogger({ drain })",")",[616,700,701,702,705,706,709],{},"Subscribe with ",[623,703,704],{},"stream.subscribe((event) => ...)"," for sync listeners or ",[623,707,708],{},"for await (const event of stream.events())"," for async iteration",[616,711,712,713,716],{},"Seed history for late subscribers with ",[623,714,715],{},"stream.recent()"," (snapshot of the ring buffer) before opening the live iterator",[616,718,719,720,723,724,727],{},"Tune ",[623,721,722],{},"buffer"," for replay history and ",[623,725,726],{},"perSubscriberQueue"," for slow-consumer backpressure",[616,729,730],{},"Skip on serverless platforms. The stream is in-process, so isolated invocations won't share it",[604,732,733,734],{},"Docs: ",[735,736,737],"a",{"href":737,"rel":738},"https:\u002F\u002Fwww.evlog.dev\u002Fextend\u002Fstream",[739],"nofollow",[741,742,747],"pre",{"className":743,"code":744,"language":745,"meta":746,"style":746},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createStreamDrain } from 'evlog\u002Fstream'\n\nconst stream = createStreamDrain({ buffer: 200 })\n\nnitroApp.hooks.hook('evlog:drain', stream.drain)\n\nconst off = stream.subscribe((event) => {\n  if (event.level === 'error') notify(event)\n})\noff()\n\nfor (const past of stream.recent()) {\n  bootstrap(past)\n}\nfor await (const event of stream.events()) {\n  bootstrap(event)\n}\n","ts","",[623,748,749,781,788,826,831,869,874,907,945,953,962,967,996,1009,1015,1043,1054],{"__ignoreMap":746},[750,751,754,758,762,766,769,772,775,778],"span",{"class":752,"line":753},"line",1,[750,755,757],{"class":756},"s7zQu","import",[750,759,761],{"class":760},"sMK4o"," {",[750,763,765],{"class":764},"sTEyZ"," createStreamDrain",[750,767,768],{"class":760}," }",[750,770,771],{"class":756}," from",[750,773,774],{"class":760}," '",[750,776,682],{"class":777},"sfazB",[750,779,780],{"class":760},"'\n",[750,782,784],{"class":752,"line":783},2,[750,785,787],{"emptyLinePlaceholder":786},true,"\n",[750,789,791,795,798,801,804,807,810,814,817,821,823],{"class":752,"line":790},3,[750,792,794],{"class":793},"spNyl","const",[750,796,797],{"class":764}," stream ",[750,799,800],{"class":760},"=",[750,802,765],{"class":803},"s2Zo4",[750,805,806],{"class":764},"(",[750,808,809],{"class":760},"{",[750,811,813],{"class":812},"swJcz"," buffer",[750,815,816],{"class":760},":",[750,818,820],{"class":819},"sbssI"," 200",[750,822,768],{"class":760},[750,824,825],{"class":764},")\n",[750,827,829],{"class":752,"line":828},4,[750,830,787],{"emptyLinePlaceholder":786},[750,832,834,837,840,843,845,848,850,853,856,858,861,864,866],{"class":752,"line":833},5,[750,835,836],{"class":764},"nitroApp",[750,838,839],{"class":760},".",[750,841,842],{"class":764},"hooks",[750,844,839],{"class":760},[750,846,847],{"class":803},"hook",[750,849,806],{"class":764},[750,851,852],{"class":760},"'",[750,854,855],{"class":777},"evlog:drain",[750,857,852],{"class":760},[750,859,860],{"class":760},",",[750,862,863],{"class":764}," stream",[750,865,839],{"class":760},[750,867,868],{"class":764},"drain)\n",[750,870,872],{"class":752,"line":871},6,[750,873,787],{"emptyLinePlaceholder":786},[750,875,877,879,882,884,886,888,891,893,895,899,901,904],{"class":752,"line":876},7,[750,878,794],{"class":793},[750,880,881],{"class":764}," off ",[750,883,800],{"class":760},[750,885,863],{"class":764},[750,887,839],{"class":760},[750,889,890],{"class":803},"subscribe",[750,892,806],{"class":764},[750,894,806],{"class":760},[750,896,898],{"class":897},"sHdIc","event",[750,900,698],{"class":760},[750,902,903],{"class":793}," =>",[750,905,906],{"class":760}," {\n",[750,908,910,913,916,918,920,923,926,928,931,933,936,939,941,943],{"class":752,"line":909},8,[750,911,912],{"class":756},"  if",[750,914,915],{"class":812}," (",[750,917,898],{"class":764},[750,919,839],{"class":760},[750,921,922],{"class":764},"level",[750,924,925],{"class":760}," ===",[750,927,774],{"class":760},[750,929,930],{"class":777},"error",[750,932,852],{"class":760},[750,934,935],{"class":812},") ",[750,937,938],{"class":803},"notify",[750,940,806],{"class":812},[750,942,898],{"class":764},[750,944,825],{"class":812},[750,946,948,951],{"class":752,"line":947},9,[750,949,950],{"class":760},"}",[750,952,825],{"class":764},[750,954,956,959],{"class":752,"line":955},10,[750,957,958],{"class":803},"off",[750,960,961],{"class":764},"()\n",[750,963,965],{"class":752,"line":964},11,[750,966,787],{"emptyLinePlaceholder":786},[750,968,970,973,975,977,980,983,985,987,990,993],{"class":752,"line":969},12,[750,971,972],{"class":756},"for",[750,974,915],{"class":764},[750,976,794],{"class":793},[750,978,979],{"class":764}," past ",[750,981,982],{"class":760},"of",[750,984,863],{"class":764},[750,986,839],{"class":760},[750,988,989],{"class":803},"recent",[750,991,992],{"class":764},"()) ",[750,994,995],{"class":760},"{\n",[750,997,999,1002,1004,1007],{"class":752,"line":998},13,[750,1000,1001],{"class":803},"  bootstrap",[750,1003,806],{"class":812},[750,1005,1006],{"class":764},"past",[750,1008,825],{"class":812},[750,1010,1012],{"class":752,"line":1011},14,[750,1013,1014],{"class":760},"}\n",[750,1016,1018,1020,1023,1025,1027,1030,1032,1034,1036,1039,1041],{"class":752,"line":1017},15,[750,1019,972],{"class":756},[750,1021,1022],{"class":756}," await",[750,1024,915],{"class":764},[750,1026,794],{"class":793},[750,1028,1029],{"class":764}," event ",[750,1031,982],{"class":760},[750,1033,863],{"class":764},[750,1035,839],{"class":760},[750,1037,1038],{"class":803},"events",[750,1040,992],{"class":764},[750,1042,995],{"class":760},[750,1044,1046,1048,1050,1052],{"class":752,"line":1045},16,[750,1047,1001],{"class":803},[750,1049,806],{"class":812},[750,1051,898],{"class":764},[750,1053,825],{"class":812},[750,1055,1057],{"class":752,"line":1056},17,[750,1058,1014],{"class":760},[1060,1061,346],"h3",{"id":1062},"options",[1064,1065,1066,1082],"table",{},[1067,1068,1069],"thead",{},[1070,1071,1072,1076,1079],"tr",{},[1073,1074,1075],"th",{},"Option",[1073,1077,1078],{},"Type",[1073,1080,1081],{},"Description",[1083,1084,1085,1111,1131],"tbody",{},[1070,1086,1087,1092,1097],{},[1088,1089,1090],"td",{},[623,1091,722],{},[1088,1093,1094],{},[623,1095,1096],{},"number",[1088,1098,1099,1100,1103,1104,1107,1108,839],{},"Ring-buffer size for ",[623,1101,1102],{},"recent()"," snapshots. Set to ",[623,1105,1106],{},"0"," to disable. Default: ",[623,1109,1110],{},"500",[1070,1112,1113,1117,1121],{},[1088,1114,1115],{},[623,1116,726],{},[1088,1118,1119],{},[623,1120,1096],{},[1088,1122,1123,1124,1127,1128,839],{},"Max queued events per ",[623,1125,1126],{},"events()"," async iterator before the oldest are dropped. The drain itself is never blocked. Default: ",[623,1129,1130],{},"1000",[1070,1132,1133,1138,1143],{},[1088,1134,1135],{},[623,1136,1137],{},"filter",[1088,1139,1140],{},[623,1141,1142],{},"(event) => boolean",[1088,1144,1145,1146,1149],{},"Optional predicate run on each drained event — return ",[623,1147,1148],{},"false"," to skip the event entirely (neither buffered nor delivered).",[604,1151,1152,1155,1156,1158],{},[623,1153,1154],{},"stream.drain(events)"," accepts either a single event or a batch. ",[623,1157,715],{}," returns a snapshot of the buffered events (oldest first, most recent last) for ad-hoc inspection or to seed a UI panel.",[652,1160,1162],{"id":1161},"network-bridge-stream-server","Network bridge: stream server",[1164,1165],"sse-wire",{},[604,1167,1168,1170,1171,1174],{},[623,1169,634],{}," boots a tiny ",[623,1172,1173],{},"node:http"," server in the same process as your app, on its own ephemeral port, and exposes the in-process bus over Server-Sent Events. Any consumer (browser tab, CLI, Tauri\u002FElectron devtool) can subscribe, and your application API is untouched.",[637,1176,1177,1180],{"icon":377},[608,1178,1179],{},"Strict opt-in."," Nothing starts unless you set the option explicitly. There is no auto-enable in dev, and the server only boots when you ask for it.",[664,1182,1184,1187,1245],{":actions":666,"description":1183,"icon":466},"Expose the evlog stream over SSE",[604,1185,1186],{},"Turn on the local stream server so I can subscribe to wide events from a browser tab, CLI, or Tauri\u002FElectron devtool.",[613,1188,1189,1213,1220,1231,1242],{},[616,1190,1191,1192,1195,1196,1199,1200,1195,1203,1206,1207,1209,1210,1212],{},"Detect my framework and opt in explicitly (Nuxt: ",[623,1193,1194],{},"evlog.stream: true"," in ",[623,1197,1198],{},"nuxt.config.ts","; Next.js: ",[623,1201,1202],{},"defineStreamedInstrumentation({ stream: true })",[623,1204,1205],{},"instrumentation.ts","; Hono\u002FExpress\u002FFastify\u002FElysia\u002Fstandalone: call ",[623,1208,634],{}," once at boot and register the returned ",[623,1211,689],{}," on the evlog drain hook)",[616,1214,1215,1216,1219],{},"Never enable in production by default; gate it behind ",[623,1217,1218],{},"process.env.NODE_ENV !== 'production'"," or a feature flag",[616,1221,1222,1223,1226,1227,1230],{},"For shared dev environments, set ",[623,1224,1225],{},"token: process.env.EVLOG_STREAM_TOKEN"," and have the consumer send it as ",[623,1228,1229],{},"Authorization: Bearer \u003Ctoken>"," on every request",[616,1232,1233,1234,1237,1238,1241],{},"Discover the URL from ",[623,1235,1236],{},".evlog\u002Fstream.url"," (or ",[623,1239,1240],{},"\u002Fapi\u002F_evlog\u002Fstream-info"," on Nuxt), and never hard-code the port, which is ephemeral",[616,1243,1244],{},"Skip on serverless platforms. The server is in-process",[604,1246,733,1247],{},[735,1248,737],{"href":737,"rel":1249},[739],[1060,1251,1253],{"id":1252},"what-boots-up","What boots up",[604,1255,1256,1257,1259],{},"When you opt in, evlog calls ",[623,1258,634],{}," and:",[1261,1262,1263,1266,1276,1281,1284,1287],"ol",{},[616,1264,1265],{},"Picks an ephemeral free port (or the one you specify)",[616,1267,1268,1269,1271,1272,1275],{},"Spins a tiny ",[623,1270,1173],{}," server on ",[623,1273,1274],{},"127.0.0.1"," (or your host)",[616,1277,1278,1279],{},"Writes the discovered URL to ",[623,1280,1236],{},[616,1282,1283],{},"Prints a one-line banner in the server console",[616,1285,1286],{},"Hooks the in-process stream drain into the evlog pipeline",[616,1288,1289,1290,1293,1294,1297],{},"Exposes ",[623,1291,1292],{},"GET \u002F"," for the SSE stream and ",[623,1295,1296],{},"GET \u002Finfo"," for handshake metadata",[604,1299,1300],{},"On shutdown (SIGINT \u002F SIGTERM \u002F process exit) the server cleans up listeners and removes the URL file.",[1060,1302,1304],{"id":1303},"per-framework-opt-in","Per-framework opt-in",[1306,1307,1308,1390,1459],"code-group",{},[741,1309,1311],{"className":743,"code":1310,"filename":1198,"language":745,"meta":746,"style":746},"export default defineNuxtConfig({\n  modules: ['evlog\u002Fnuxt'],\n  evlog: {\n    stream: true,\n    \u002F\u002F or: stream: { port: 4444, token: process.env.EVLOG_STREAM_TOKEN }\n  },\n})\n",[623,1312,1313,1328,1351,1360,1373,1379,1384],{"__ignoreMap":746},[750,1314,1315,1318,1321,1324,1326],{"class":752,"line":753},[750,1316,1317],{"class":756},"export",[750,1319,1320],{"class":756}," default",[750,1322,1323],{"class":803}," defineNuxtConfig",[750,1325,806],{"class":764},[750,1327,995],{"class":760},[750,1329,1330,1333,1335,1338,1340,1343,1345,1348],{"class":752,"line":783},[750,1331,1332],{"class":812},"  modules",[750,1334,816],{"class":760},[750,1336,1337],{"class":764}," [",[750,1339,852],{"class":760},[750,1341,1342],{"class":777},"evlog\u002Fnuxt",[750,1344,852],{"class":760},[750,1346,1347],{"class":764},"]",[750,1349,1350],{"class":760},",\n",[750,1352,1353,1356,1358],{"class":752,"line":790},[750,1354,1355],{"class":812},"  evlog",[750,1357,816],{"class":760},[750,1359,906],{"class":760},[750,1361,1362,1365,1367,1371],{"class":752,"line":828},[750,1363,1364],{"class":812},"    stream",[750,1366,816],{"class":760},[750,1368,1370],{"class":1369},"sfNiH"," true",[750,1372,1350],{"class":760},[750,1374,1375],{"class":752,"line":833},[750,1376,1378],{"class":1377},"sHwdD","    \u002F\u002F or: stream: { port: 4444, token: process.env.EVLOG_STREAM_TOKEN }\n",[750,1380,1381],{"class":752,"line":871},[750,1382,1383],{"class":760},"  },\n",[750,1385,1386,1388],{"class":752,"line":876},[750,1387,950],{"class":760},[750,1389,825],{"class":764},[741,1391,1393],{"className":743,"code":1392,"filename":1205,"language":745,"meta":746,"style":746},"import { defineStreamedInstrumentation } from 'evlog\u002Fnext\u002Fstream'\n\nexport const { register } = defineStreamedInstrumentation({\n  stream: true,\n})\n",[623,1394,1395,1415,1419,1442,1453],{"__ignoreMap":746},[750,1396,1397,1399,1401,1404,1406,1408,1410,1413],{"class":752,"line":753},[750,1398,757],{"class":756},[750,1400,761],{"class":760},[750,1402,1403],{"class":764}," defineStreamedInstrumentation",[750,1405,768],{"class":760},[750,1407,771],{"class":756},[750,1409,774],{"class":760},[750,1411,1412],{"class":777},"evlog\u002Fnext\u002Fstream",[750,1414,780],{"class":760},[750,1416,1417],{"class":752,"line":783},[750,1418,787],{"emptyLinePlaceholder":786},[750,1420,1421,1423,1426,1428,1431,1433,1436,1438,1440],{"class":752,"line":790},[750,1422,1317],{"class":756},[750,1424,1425],{"class":793}," const",[750,1427,761],{"class":760},[750,1429,1430],{"class":764}," register ",[750,1432,950],{"class":760},[750,1434,1435],{"class":760}," =",[750,1437,1403],{"class":803},[750,1439,806],{"class":764},[750,1441,995],{"class":760},[750,1443,1444,1447,1449,1451],{"class":752,"line":828},[750,1445,1446],{"class":812},"  stream",[750,1448,816],{"class":760},[750,1450,1370],{"class":1369},[750,1452,1350],{"class":760},[750,1454,1455,1457],{"class":752,"line":833},[750,1456,950],{"class":760},[750,1458,825],{"class":764},[741,1460,1463],{"className":743,"code":1461,"filename":1462,"language":745,"meta":746,"style":746},"import { startStreamServer } from 'evlog\u002Fstream'\n\nif (process.env.NODE_ENV !== 'production' && process.env.EVLOG_STREAM === '1') {\n  const { drain } = await startStreamServer()\n  \u002F\u002F Plug `drain` into the evlog drain hook for your framework\n}\n","Hono \u002F Express \u002F Fastify \u002F standalone",[623,1464,1465,1484,1488,1545,1565,1570],{"__ignoreMap":746},[750,1466,1467,1469,1471,1474,1476,1478,1480,1482],{"class":752,"line":753},[750,1468,757],{"class":756},[750,1470,761],{"class":760},[750,1472,1473],{"class":764}," startStreamServer",[750,1475,768],{"class":760},[750,1477,771],{"class":756},[750,1479,774],{"class":760},[750,1481,682],{"class":777},[750,1483,780],{"class":760},[750,1485,1486],{"class":752,"line":783},[750,1487,787],{"emptyLinePlaceholder":786},[750,1489,1490,1493,1496,1498,1501,1503,1506,1509,1511,1514,1516,1519,1522,1524,1526,1528,1531,1534,1536,1539,1541,1543],{"class":752,"line":790},[750,1491,1492],{"class":756},"if",[750,1494,1495],{"class":764}," (process",[750,1497,839],{"class":760},[750,1499,1500],{"class":764},"env",[750,1502,839],{"class":760},[750,1504,1505],{"class":764},"NODE_ENV ",[750,1507,1508],{"class":760},"!==",[750,1510,774],{"class":760},[750,1512,1513],{"class":777},"production",[750,1515,852],{"class":760},[750,1517,1518],{"class":760}," &&",[750,1520,1521],{"class":764}," process",[750,1523,839],{"class":760},[750,1525,1500],{"class":764},[750,1527,839],{"class":760},[750,1529,1530],{"class":764},"EVLOG_STREAM ",[750,1532,1533],{"class":760},"===",[750,1535,774],{"class":760},[750,1537,1538],{"class":777},"1",[750,1540,852],{"class":760},[750,1542,935],{"class":764},[750,1544,995],{"class":760},[750,1546,1547,1550,1552,1555,1557,1559,1561,1563],{"class":752,"line":828},[750,1548,1549],{"class":793},"  const",[750,1551,761],{"class":760},[750,1553,1554],{"class":764}," drain",[750,1556,768],{"class":760},[750,1558,1435],{"class":760},[750,1560,1022],{"class":756},[750,1562,1473],{"class":803},[750,1564,961],{"class":812},[750,1566,1567],{"class":752,"line":833},[750,1568,1569],{"class":1377},"  \u002F\u002F Plug `drain` into the evlog drain hook for your framework\n",[750,1571,1572],{"class":752,"line":871},[750,1573,1014],{"class":760},[604,1575,1576,1577,1579,1580,1583,1584,1586],{},"The Hono \u002F Express \u002F Fastify integrations don't need a \"feature PR\", because ",[623,1578,634],{}," is ",[608,1581,1582],{},"orthogonal"," to your framework. You boot it once and connect its ",[623,1585,689],{}," to the evlog pipeline like any other drain.",[1060,1588,1590],{"id":1589},"discovery","Discovery",[604,1592,1593],{},"The mini-server runs on a random port, so any consumer must discover it.",[741,1595,1597],{"className":743,"code":1596,"filename":1236,"language":745,"meta":746,"style":746},"http:\u002F\u002F127.0.0.1:53942\n",[623,1598,1599],{"__ignoreMap":746},[750,1600,1601,1605,1607],{"class":752,"line":753},[750,1602,1604],{"class":1603},"sBMFI","http",[750,1606,816],{"class":760},[750,1608,1609],{"class":1377},"\u002F\u002F127.0.0.1:53942\n",[604,1611,1612],{},"Read directly from disk:",[741,1614,1616],{"className":743,"code":1615,"language":745,"meta":746,"style":746},"import { readFile } from 'node:fs\u002Fpromises'\n\nconst url = (await readFile('.evlog\u002Fstream.url', 'utf-8')).trim()\n",[623,1617,1618,1638,1642],{"__ignoreMap":746},[750,1619,1620,1622,1624,1627,1629,1631,1633,1636],{"class":752,"line":753},[750,1621,757],{"class":756},[750,1623,761],{"class":760},[750,1625,1626],{"class":764}," readFile",[750,1628,768],{"class":760},[750,1630,771],{"class":756},[750,1632,774],{"class":760},[750,1634,1635],{"class":777},"node:fs\u002Fpromises",[750,1637,780],{"class":760},[750,1639,1640],{"class":752,"line":783},[750,1641,787],{"emptyLinePlaceholder":786},[750,1643,1644,1646,1649,1651,1653,1656,1658,1660,1662,1664,1666,1668,1670,1673,1675,1678,1680,1683],{"class":752,"line":790},[750,1645,794],{"class":793},[750,1647,1648],{"class":764}," url ",[750,1650,800],{"class":760},[750,1652,915],{"class":764},[750,1654,1655],{"class":756},"await",[750,1657,1626],{"class":803},[750,1659,806],{"class":764},[750,1661,852],{"class":760},[750,1663,1236],{"class":777},[750,1665,852],{"class":760},[750,1667,860],{"class":760},[750,1669,774],{"class":760},[750,1671,1672],{"class":777},"utf-8",[750,1674,852],{"class":760},[750,1676,1677],{"class":764},"))",[750,1679,839],{"class":760},[750,1681,1682],{"class":803},"trim",[750,1684,961],{"class":764},[604,1686,1687],{},"Or, for same-origin browser tabs in a Nuxt app, hit the discovery route:",[741,1689,1691],{"className":743,"code":1690,"language":745,"meta":746,"style":746},"const { url } = await fetch('\u002Fapi\u002F_evlog\u002Fstream-info').then(r => r.json())\n",[623,1692,1693],{"__ignoreMap":746},[750,1694,1695,1697,1699,1701,1703,1705,1707,1710,1712,1714,1716,1718,1720,1722,1725,1727,1730,1732,1735,1737,1740],{"class":752,"line":753},[750,1696,794],{"class":793},[750,1698,761],{"class":760},[750,1700,1648],{"class":764},[750,1702,950],{"class":760},[750,1704,1435],{"class":760},[750,1706,1022],{"class":756},[750,1708,1709],{"class":803}," fetch",[750,1711,806],{"class":764},[750,1713,852],{"class":760},[750,1715,1240],{"class":777},[750,1717,852],{"class":760},[750,1719,698],{"class":764},[750,1721,839],{"class":760},[750,1723,1724],{"class":803},"then",[750,1726,806],{"class":764},[750,1728,1729],{"class":897},"r",[750,1731,903],{"class":793},[750,1733,1734],{"class":764}," r",[750,1736,839],{"class":760},[750,1738,1739],{"class":803},"json",[750,1741,1742],{"class":764},"())\n",[1060,1744,1746],{"id":1745},"wire-format","Wire format",[604,1748,1749,1750,816],{},"Every SSE message has the shape ",[623,1751,1752],{},"{ evlog: '1', type, data }",[1064,1754,1755,1772],{},[1067,1756,1757],{},[1070,1758,1759,1764,1767],{},[1073,1760,1761],{},[623,1762,1763],{},"type",[1073,1765,1766],{},"When",[1073,1768,1769],{},[623,1770,1771],{},"data",[1083,1773,1774,1789,1810,1823],{},[1070,1775,1776,1781,1784],{},[1088,1777,1778],{},[623,1779,1780],{},"hello",[1088,1782,1783],{},"First frame after connect",[1088,1785,1786],{},[623,1787,1788],{},"{ evlogVersion, bufferSize, heartbeatMs }",[1070,1790,1791,1796,1805],{},[1088,1792,1793],{},[623,1794,1795],{},"replay",[1088,1797,1798,1799,1801,1802],{},"Right after ",[623,1800,1780],{},", replays buffered events when the consumer passed ",[623,1803,1804],{},"?since=\u003Ciso>",[1088,1806,1807],{},[623,1808,1809],{},"WideEvent",[1070,1811,1812,1816,1819],{},[1088,1813,1814],{},[623,1815,898],{},[1088,1817,1818],{},"Every emitted event after that",[1088,1820,1821],{},[623,1822,1809],{},[1070,1824,1825,1830,1836],{},[1088,1826,1827],{},[623,1828,1829],{},"ping",[1088,1831,1832,1833,698],{},"Heartbeat (default every 15s, configurable via ",[623,1834,1835],{},"heartbeatMs",[1088,1837,1838],{},[623,1839,1840],{},"{ ts: number }",[741,1842,1845],{"className":743,"code":1843,"filename":1844,"language":745,"meta":746,"style":746},"const { url } = await fetch('\u002Fapi\u002F_evlog\u002Fstream-info').then(r => r.json())\nconst es = new EventSource(url)\n\nes.onmessage = (msg) => {\n  const { type, data } = JSON.parse(msg.data)\n  if (type === 'event') events.push(data)\n}\n","Browser consumer",[623,1846,1847,1891,1909,1913,1936,1972,2003],{"__ignoreMap":746},[750,1848,1849,1851,1853,1855,1857,1859,1861,1863,1865,1867,1869,1871,1873,1875,1877,1879,1881,1883,1885,1887,1889],{"class":752,"line":753},[750,1850,794],{"class":793},[750,1852,761],{"class":760},[750,1854,1648],{"class":764},[750,1856,950],{"class":760},[750,1858,1435],{"class":760},[750,1860,1022],{"class":756},[750,1862,1709],{"class":803},[750,1864,806],{"class":764},[750,1866,852],{"class":760},[750,1868,1240],{"class":777},[750,1870,852],{"class":760},[750,1872,698],{"class":764},[750,1874,839],{"class":760},[750,1876,1724],{"class":803},[750,1878,806],{"class":764},[750,1880,1729],{"class":897},[750,1882,903],{"class":793},[750,1884,1734],{"class":764},[750,1886,839],{"class":760},[750,1888,1739],{"class":803},[750,1890,1742],{"class":764},[750,1892,1893,1895,1898,1900,1903,1906],{"class":752,"line":783},[750,1894,794],{"class":793},[750,1896,1897],{"class":764}," es ",[750,1899,800],{"class":760},[750,1901,1902],{"class":760}," new",[750,1904,1905],{"class":803}," EventSource",[750,1907,1908],{"class":764},"(url)\n",[750,1910,1911],{"class":752,"line":790},[750,1912,787],{"emptyLinePlaceholder":786},[750,1914,1915,1918,1920,1923,1925,1927,1930,1932,1934],{"class":752,"line":828},[750,1916,1917],{"class":764},"es",[750,1919,839],{"class":760},[750,1921,1922],{"class":803},"onmessage",[750,1924,1435],{"class":760},[750,1926,915],{"class":760},[750,1928,1929],{"class":897},"msg",[750,1931,698],{"class":760},[750,1933,903],{"class":793},[750,1935,906],{"class":760},[750,1937,1938,1940,1942,1945,1947,1950,1952,1954,1957,1959,1962,1964,1966,1968,1970],{"class":752,"line":833},[750,1939,1549],{"class":793},[750,1941,761],{"class":760},[750,1943,1944],{"class":764}," type",[750,1946,860],{"class":760},[750,1948,1949],{"class":764}," data",[750,1951,768],{"class":760},[750,1953,1435],{"class":760},[750,1955,1956],{"class":764}," JSON",[750,1958,839],{"class":760},[750,1960,1961],{"class":803},"parse",[750,1963,806],{"class":812},[750,1965,1929],{"class":764},[750,1967,839],{"class":760},[750,1969,1771],{"class":764},[750,1971,825],{"class":812},[750,1973,1974,1976,1978,1980,1982,1984,1986,1988,1990,1992,1994,1997,1999,2001],{"class":752,"line":871},[750,1975,912],{"class":756},[750,1977,915],{"class":812},[750,1979,1763],{"class":764},[750,1981,925],{"class":760},[750,1983,774],{"class":760},[750,1985,898],{"class":777},[750,1987,852],{"class":760},[750,1989,935],{"class":812},[750,1991,1038],{"class":764},[750,1993,839],{"class":760},[750,1995,1996],{"class":803},"push",[750,1998,806],{"class":812},[750,2000,1771],{"class":764},[750,2002,825],{"class":812},[750,2004,2005],{"class":752,"line":876},[750,2006,1014],{"class":760},[1060,2008,2010],{"id":2009},"auth-cors","Auth + CORS",[1064,2012,2013,2022],{},[1067,2014,2015],{},[1070,2016,2017,2019],{},[1073,2018,1075],{},[1073,2020,2021],{},"Behavior",[1083,2023,2024,2037,2059,2076,2089],{},[1070,2025,2026,2031],{},[1088,2027,2028],{},[623,2029,2030],{},"token",[1088,2032,2033,2034,2036],{},"When set, the server requires ",[623,2035,1229],{}," on every request and 401s otherwise.",[1070,2038,2039,2042],{},[1088,2040,2041],{},"(no token)",[1088,2043,2044,2045,2048,2049,2051,2052,2051,2055,2058],{},"Connections are accepted only when there is no ",[623,2046,2047],{},"Origin"," header or the origin host is local (",[623,2050,1274],{}," \u002F ",[623,2053,2054],{},"localhost",[623,2056,2057],{},"[::1]","). Other origins receive 403.",[1070,2060,2061,2066],{},[1088,2062,2063],{},[623,2064,2065],{},"host",[1088,2067,2068,2069,2071,2072,2075],{},"Default ",[623,2070,1274],{}," — never reachable from the LAN. Override to ",[623,2073,2074],{},"0.0.0.0"," only with a token set.",[1070,2077,2078,2082],{},[1088,2079,2080],{},[623,2081,1835],{},[1088,2083,2084,2085,2088],{},"Heartbeat interval (default ",[623,2086,2087],{},"15000",").",[1070,2090,2091,2095],{},[1088,2092,2093],{},[623,2094,722],{},[1088,2096,2097,2098,2100,2101,839],{},"Ring buffer kept on the underlying default stream — replayed for late-joining clients via ",[623,2099,1804],{},". Default ",[623,2102,1110],{},[652,2104,2106],{"id":2105},"going-further","Going further",[613,2108,2109,2114],{},[616,2110,2111,2113],{},[735,2112,499],{"href":500},": replay or tail historic NDJSON files (cross-process, survives restarts)",[616,2115,2116,2119],{},[735,2117,2118],{"href":504},"Consumer recipes",": build a minimal devtool, pipe to curl + jq, replay history then go live",[2121,2122,2123],"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 .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 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 .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 .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":746,"searchDepth":783,"depth":783,"links":2125},[2126,2129,2136],{"id":654,"depth":783,"text":620,"children":2127},[2128],{"id":1062,"depth":790,"text":346},{"id":1161,"depth":783,"text":1162,"children":2130},[2131,2132,2133,2134,2135],{"id":1252,"depth":790,"text":1253},{"id":1303,"depth":790,"text":1304},{"id":1589,"depth":790,"text":1590},{"id":1745,"depth":790,"text":1746},{"id":2009,"depth":790,"text":2010},{"id":2105,"depth":783,"text":2106},"Subscribe to wide events flowing through evlog — in-process with createStreamDrain, or over the network with the local SSE stream server.","md",null,{},{"title":485,"icon":488},{"title":485,"description":2137},"FkYaRtI0XInh-HT0tI8fvluYWEYpMK0BvPtqH3aMG4U",[2145,2147],{"title":41,"path":481,"stem":482,"description":2146,"icon":483,"children":-1},"Observe what flows through the pipeline, plug into it, or build your own bricks. The map of every extension point evlog exposes.",{"title":490,"path":491,"stem":492,"description":2148,"icon":493,"children":-1},"Build evlog support for a framework or runtime that has no integration, with defineFrameworkIntegration or the lower-level helpers.",1789076918577]