[{"data":1,"prerenderedAt":2119},["ShallowReactive",2],{"navigation_docs":3,"-extend-stream":567,"-extend-stream-surround":2114},[4,30,80,133,313,444,503,542],{"title":5,"path":6,"stem":7,"children":8,"page":29},"Start","\u002Fstart","1.start",[9,14,19,24],{"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",false,{"title":31,"path":32,"stem":33,"children":34,"page":29},"Learn","\u002Flearn","2.learn",[35,40,45,50,55,60,65,70,75],{"title":36,"path":37,"stem":38,"icon":39},"Overview","\u002Flearn\u002Foverview","2.learn\u002F0.overview","i-lucide-list",{"title":41,"path":42,"stem":43,"icon":44},"Simple Logging","\u002Flearn\u002Fsimple-logging","2.learn\u002F1.simple-logging","i-lucide-terminal",{"title":46,"path":47,"stem":48,"icon":49},"Wide Events","\u002Flearn\u002Fwide-events","2.learn\u002F2.wide-events","i-lucide-layers",{"title":51,"path":52,"stem":53,"icon":54},"Structured Errors","\u002Flearn\u002Fstructured-errors","2.learn\u002F3.structured-errors","i-lucide-shield-alert",{"title":56,"path":57,"stem":58,"icon":59},"Lifecycle","\u002Flearn\u002Flifecycle","2.learn\u002F4.lifecycle","i-lucide-arrow-right-left",{"title":61,"path":62,"stem":63,"icon":64},"Sampling","\u002Flearn\u002Fsampling","2.learn\u002F5.sampling","i-lucide-filter",{"title":66,"path":67,"stem":68,"icon":69},"Auto-Redaction","\u002Flearn\u002Fredaction","2.learn\u002F6.redaction","i-lucide-eye-off",{"title":71,"path":72,"stem":73,"icon":74},"Typed Fields","\u002Flearn\u002Ftyped-fields","2.learn\u002F7.typed-fields","i-simple-icons-typescript",{"title":76,"path":77,"stem":78,"icon":79},"Catalogs","\u002Flearn\u002Fcatalogs","2.learn\u002F8.catalogs","i-lucide-book-open",{"title":81,"path":82,"stem":83,"children":84,"page":29},"CLI","\u002Fcli","3.cli",[85,88,93,98,103,108,113,118,123,128],{"title":36,"path":86,"stem":87,"icon":44},"\u002Fcli\u002Foverview","3.cli\u002F0.overview",{"title":89,"path":90,"stem":91,"icon":92},"init","\u002Fcli\u002Finit","3.cli\u002F1.init","i-lucide-wand-sparkles",{"title":94,"path":95,"stem":96,"icon":97},"map","\u002Fcli\u002Fmap","3.cli\u002F2.map","i-lucide-radar",{"title":99,"path":100,"stem":101,"icon":102},"Rules","\u002Fcli\u002Frules","3.cli\u002F3.rules","i-lucide-list-checks",{"title":104,"path":105,"stem":106,"icon":107},"Scoring","\u002Fcli\u002Fscoring","3.cli\u002F4.scoring","i-lucide-gauge",{"title":109,"path":110,"stem":111,"icon":112},"CI","\u002Fcli\u002Fci","3.cli\u002F5.ci","i-lucide-git-pull-request",{"title":114,"path":115,"stem":116,"icon":117},"doctor","\u002Fcli\u002Fdoctor","3.cli\u002F6.doctor","i-lucide-stethoscope",{"title":119,"path":120,"stem":121,"icon":122},"telemetry","\u002Fcli\u002Ftelemetry","3.cli\u002F7.telemetry","i-lucide-bar-chart-3",{"title":124,"path":125,"stem":126,"icon":127},"agents","\u002Fcli\u002Fagents","3.cli\u002F8.agents","i-lucide-bot",{"title":129,"path":130,"stem":131,"icon":132},"Observability Score","\u002Fcli\u002Fobservability-score","3.cli\u002F9.observability-score","i-lucide-activity",{"title":134,"path":135,"stem":136,"children":137,"page":29},"Integrate","\u002Fintegrate","4.integrate",[138,142,225],{"title":36,"path":139,"stem":140,"icon":141},"\u002Fintegrate\u002Foverview","4.integrate\u002F0.overview","i-lucide-plug",{"title":143,"path":144,"stem":145,"children":146,"page":29},"Adapters","\u002Fintegrate\u002Fadapters","4.integrate\u002Fadapters",[147,150,180,205],{"title":36,"path":148,"stem":149,"icon":39},"\u002Fintegrate\u002Fadapters\u002Foverview","4.integrate\u002Fadapters\u002F01.overview",{"title":151,"path":152,"stem":153,"children":154,"page":29},"Cloud","\u002Fintegrate\u002Fadapters\u002Fcloud","4.integrate\u002Fadapters\u002Fcloud",[155,160,165,170,175],{"title":156,"path":157,"stem":158,"icon":159},"Axiom","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Faxiom","4.integrate\u002Fadapters\u002Fcloud\u002F01.axiom","i-custom-axiom",{"title":161,"path":162,"stem":163,"icon":164},"PostHog","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fposthog","4.integrate\u002Fadapters\u002Fcloud\u002F02.posthog","i-simple-icons-posthog",{"title":166,"path":167,"stem":168,"icon":169},"Sentry","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fsentry","4.integrate\u002Fadapters\u002Fcloud\u002F03.sentry","i-simple-icons-sentry",{"title":171,"path":172,"stem":173,"icon":174},"Better Stack","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fbetter-stack","4.integrate\u002Fadapters\u002Fcloud\u002F04.better-stack","i-simple-icons-betterstack",{"title":176,"path":177,"stem":178,"icon":179},"Datadog","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fdatadog","4.integrate\u002Fadapters\u002Fcloud\u002F05.datadog","i-simple-icons-datadog",{"title":181,"path":182,"stem":183,"children":184,"page":29},"Cloud or Self-Hosted","\u002Fintegrate\u002Fadapters\u002Fhybrid","4.integrate\u002Fadapters\u002Fhybrid",[185,190,195,200],{"title":186,"path":187,"stem":188,"icon":189},"Grafana Loki","\u002Fintegrate\u002Fadapters\u002Fhybrid\u002Floki","4.integrate\u002Fadapters\u002Fhybrid\u002F01.loki","i-simple-icons-grafana",{"title":191,"path":192,"stem":193,"icon":194},"ClickHouse","\u002Fintegrate\u002Fadapters\u002Fhybrid\u002Fclickhouse","4.integrate\u002Fadapters\u002Fhybrid\u002F02.clickhouse","i-simple-icons-clickhouse",{"title":196,"path":197,"stem":198,"icon":199},"OTLP","\u002Fintegrate\u002Fadapters\u002Fhybrid\u002Fotlp","4.integrate\u002Fadapters\u002Fhybrid\u002F03.otlp","i-simple-icons-opentelemetry",{"title":201,"path":202,"stem":203,"icon":204},"HyperDX","\u002Fintegrate\u002Fadapters\u002Fhybrid\u002Fhyperdx","4.integrate\u002Fadapters\u002Fhybrid\u002F04.hyperdx","i-custom-hyperdx",{"title":206,"path":207,"stem":208,"children":209,"page":29},"Self-Hosted","\u002Fintegrate\u002Fadapters\u002Fself-hosted","4.integrate\u002Fadapters\u002Fself-hosted",[210,215,220],{"title":211,"path":212,"stem":213,"icon":214},"File System","\u002Fintegrate\u002Fadapters\u002Fself-hosted\u002Ffs","4.integrate\u002Fadapters\u002Fself-hosted\u002F01.fs","i-lucide-hard-drive",{"title":216,"path":217,"stem":218,"icon":219},"NuxtHub","\u002Fintegrate\u002Fadapters\u002Fself-hosted\u002Fnuxthub","4.integrate\u002Fadapters\u002Fself-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":221,"path":222,"stem":223,"icon":224},"Memory","\u002Fintegrate\u002Fadapters\u002Fself-hosted\u002Fmemory","4.integrate\u002Fadapters\u002Fself-hosted\u002F03.memory","i-lucide-cpu",{"title":226,"path":227,"stem":228,"children":229,"page":29},"Frameworks","\u002Fintegrate\u002Fframeworks","4.integrate\u002Fframeworks",[230,234,239,244,249,254,259,264,269,274,279,284,289,294,298,303,308],{"title":36,"path":231,"stem":232,"icon":233},"\u002Fintegrate\u002Fframeworks\u002Foverview","4.integrate\u002Fframeworks\u002F00.overview","i-lucide-layout-grid",{"title":235,"path":236,"stem":237,"icon":238},"Nuxt","\u002Fintegrate\u002Fframeworks\u002Fnuxt","4.integrate\u002Fframeworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":240,"path":241,"stem":242,"icon":243},"Next.js","\u002Fintegrate\u002Fframeworks\u002Fnextjs","4.integrate\u002Fframeworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":245,"path":246,"stem":247,"icon":248},"SvelteKit","\u002Fintegrate\u002Fframeworks\u002Fsveltekit","4.integrate\u002Fframeworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":250,"path":251,"stem":252,"icon":253},"Nitro","\u002Fintegrate\u002Fframeworks\u002Fnitro","4.integrate\u002Fframeworks\u002F04.nitro","i-custom-nitro",{"title":255,"path":256,"stem":257,"icon":258},"TanStack Start","\u002Fintegrate\u002Fframeworks\u002Ftanstack-start","4.integrate\u002Fframeworks\u002F05.tanstack-start","i-custom-tanstack",{"title":260,"path":261,"stem":262,"icon":263},"NestJS","\u002Fintegrate\u002Fframeworks\u002Fnestjs","4.integrate\u002Fframeworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":265,"path":266,"stem":267,"icon":268},"Express","\u002Fintegrate\u002Fframeworks\u002Fexpress","4.integrate\u002Fframeworks\u002F07.express","i-simple-icons-express",{"title":270,"path":271,"stem":272,"icon":273},"Hono","\u002Fintegrate\u002Fframeworks\u002Fhono","4.integrate\u002Fframeworks\u002F08.hono","i-simple-icons-hono",{"title":275,"path":276,"stem":277,"icon":278},"Fastify","\u002Fintegrate\u002Fframeworks\u002Ffastify","4.integrate\u002Fframeworks\u002F09.fastify","i-simple-icons-fastify",{"title":280,"path":281,"stem":282,"icon":283},"Elysia","\u002Fintegrate\u002Fframeworks\u002Felysia","4.integrate\u002Fframeworks\u002F10.elysia","i-custom-elysia",{"title":285,"path":286,"stem":287,"icon":288},"React Router","\u002Fintegrate\u002Fframeworks\u002Freact-router","4.integrate\u002Fframeworks\u002F11.react-router","i-custom-reactrouter",{"title":290,"path":291,"stem":292,"icon":293},"Cloudflare Workers","\u002Fintegrate\u002Fframeworks\u002Fcloudflare-workers","4.integrate\u002Fframeworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":295,"path":296,"stem":297,"icon":74},"Standalone","\u002Fintegrate\u002Fframeworks\u002Fstandalone","4.integrate\u002Fframeworks\u002F13.standalone",{"title":299,"path":300,"stem":301,"icon":302},"Astro","\u002Fintegrate\u002Fframeworks\u002Fastro","4.integrate\u002Fframeworks\u002F14.astro","i-simple-icons-astro",{"title":304,"path":305,"stem":306,"icon":307},"oRPC","\u002Fintegrate\u002Fframeworks\u002Forpc","4.integrate\u002Fframeworks\u002F15.orpc","i-lucide-network",{"title":309,"path":310,"stem":311,"icon":312},"AWS Lambda","\u002Fintegrate\u002Fframeworks\u002Faws-lambda","4.integrate\u002Fframeworks\u002F16.aws-lambda","i-custom-lambda",{"title":314,"path":315,"stem":316,"children":317,"page":29},"Use Cases","\u002Fuse-cases","5.use-cases",[318,321,326,354,381,413,434,439],{"title":36,"path":319,"stem":320,"icon":102},"\u002Fuse-cases\u002Foverview","5.use-cases\u002F0.overview",{"title":322,"path":323,"stem":324,"icon":325},"Client Logging","\u002Fuse-cases\u002Fclient-logging","5.use-cases\u002F1.client-logging","i-lucide-monitor",{"title":327,"icon":328,"path":329,"stem":330,"children":331,"page":29},"AI SDK","i-simple-icons-vercel","\u002Fuse-cases\u002Fai-sdk","5.use-cases\u002F2.ai-sdk",[332,335,340,345,350],{"title":36,"path":333,"stem":334,"icon":39},"\u002Fuse-cases\u002Fai-sdk\u002Foverview","5.use-cases\u002F2.ai-sdk\u002F01.overview",{"title":336,"path":337,"stem":338,"icon":339},"Usage","\u002Fuse-cases\u002Fai-sdk\u002Fusage","5.use-cases\u002F2.ai-sdk\u002F02.usage","i-lucide-code",{"title":341,"path":342,"stem":343,"icon":344},"Options","\u002Fuse-cases\u002Fai-sdk\u002Foptions","5.use-cases\u002F2.ai-sdk\u002F03.options","i-lucide-sliders",{"title":346,"path":347,"stem":348,"icon":349},"Metadata","\u002Fuse-cases\u002Fai-sdk\u002Fmetadata","5.use-cases\u002F2.ai-sdk\u002F04.metadata","i-lucide-database",{"title":351,"path":352,"stem":353,"icon":132},"Telemetry","\u002Fuse-cases\u002Fai-sdk\u002Ftelemetry","5.use-cases\u002F2.ai-sdk\u002F05.telemetry",{"title":355,"icon":356,"path":357,"stem":358,"children":359,"page":29},"Better Auth","i-simple-icons-betterauth","\u002Fuse-cases\u002Fbetter-auth","5.use-cases\u002F3.better-auth",[360,363,368,373,377],{"title":36,"path":361,"stem":362,"icon":39},"\u002Fuse-cases\u002Fbetter-auth\u002Foverview","5.use-cases\u002F3.better-auth\u002F01.overview",{"title":364,"path":365,"stem":366,"icon":367},"Identify User","\u002Fuse-cases\u002Fbetter-auth\u002Fidentify-user","5.use-cases\u002F3.better-auth\u002F02.identify-user","i-lucide-user-check",{"title":369,"path":370,"stem":371,"icon":372},"Middleware","\u002Fuse-cases\u002Fbetter-auth\u002Fmiddleware","5.use-cases\u002F3.better-auth\u002F03.middleware","i-lucide-shield",{"title":374,"path":375,"stem":376,"icon":325},"Client Sync","\u002Fuse-cases\u002Fbetter-auth\u002Fclient-sync","5.use-cases\u002F3.better-auth\u002F04.client-sync",{"title":378,"path":379,"stem":380,"icon":107},"Performance","\u002Fuse-cases\u002Fbetter-auth\u002Fperformance","5.use-cases\u002F3.better-auth\u002F05.performance",{"title":382,"icon":383,"path":384,"stem":385,"children":386,"page":29},"Audit Logs","i-lucide-shield-check","\u002Fuse-cases\u002Faudit","5.use-cases\u002F4.audit",[387,390,395,400,405,409],{"title":36,"path":388,"stem":389,"icon":39},"\u002Fuse-cases\u002Faudit\u002Foverview","5.use-cases\u002F4.audit\u002F01.overview",{"title":391,"path":392,"stem":393,"icon":394},"Schema","\u002Fuse-cases\u002Faudit\u002Fschema","5.use-cases\u002F4.audit\u002F02.schema","i-lucide-file-text",{"title":396,"path":397,"stem":398,"icon":399},"Recording","\u002Fuse-cases\u002Faudit\u002Frecording","5.use-cases\u002F4.audit\u002F03.recording","i-lucide-pen-line",{"title":401,"path":402,"stem":403,"icon":404},"Drains","\u002Fuse-cases\u002Faudit\u002Fpipeline","5.use-cases\u002F4.audit\u002F04.pipeline","i-lucide-link",{"title":406,"path":407,"stem":408,"icon":383},"Compliance","\u002Fuse-cases\u002Faudit\u002Fcompliance","5.use-cases\u002F4.audit\u002F05.compliance",{"title":410,"path":411,"stem":412,"icon":79},"Recipes","\u002Fuse-cases\u002Faudit\u002Frecipes","5.use-cases\u002F4.audit\u002F06.recipes",{"title":351,"icon":107,"path":414,"stem":415,"children":416,"page":29},"\u002Fuse-cases\u002Ftelemetry","5.use-cases\u002F4.telemetry",[417,420,425,430],{"title":36,"path":418,"stem":419,"icon":39},"\u002Fuse-cases\u002Ftelemetry\u002Foverview","5.use-cases\u002F4.telemetry\u002F01.overview",{"title":421,"path":422,"stem":423,"icon":424},"Setup","\u002Fuse-cases\u002Ftelemetry\u002Fsetup","5.use-cases\u002F4.telemetry\u002F02.setup","i-lucide-wrench",{"title":426,"path":427,"stem":428,"icon":429},"Ingest","\u002Fuse-cases\u002Ftelemetry\u002Fingest","5.use-cases\u002F4.telemetry\u002F03.ingest","i-lucide-server",{"title":431,"path":432,"stem":433,"icon":79},"Reference","\u002Fuse-cases\u002Ftelemetry\u002Freference","5.use-cases\u002F4.telemetry\u002F04.reference",{"title":435,"path":436,"stem":437,"icon":438},"Enrichers","\u002Fuse-cases\u002Fenrichers","5.use-cases\u002F5.enrichers","i-lucide-sparkles",{"title":440,"path":441,"stem":442,"icon":443},"eve","\u002Fuse-cases\u002Feve","5.use-cases\u002F5.eve","i-custom-eve",{"title":445,"path":446,"stem":447,"children":448,"page":29},"Extend","\u002Fextend","6.extend",[449,453,458,463,467,472,476,480,484,488,493,498],{"title":36,"path":450,"stem":451,"icon":452},"\u002Fextend\u002Foverview","6.extend\u002F0.overview","i-lucide-blocks",{"title":454,"path":455,"stem":456,"icon":457},"Stream","\u002Fextend\u002Fstream","6.extend\u002F1.stream","i-lucide-radio-tower",{"title":459,"path":460,"stem":461,"icon":462},"Custom framework","\u002Fextend\u002Fcustom-framework","6.extend\u002F10.custom-framework","i-lucide-puzzle",{"title":464,"path":465,"stem":466,"icon":457},"Diagnostics channel","\u002Fextend\u002Fdiagnostics-channel","6.extend\u002F11.diagnostics-channel",{"title":468,"path":469,"stem":470,"icon":471},"FS reader","\u002Fextend\u002Ffs-reader","6.extend\u002F2.fs-reader","i-lucide-folder-search",{"title":410,"path":473,"stem":474,"icon":475},"\u002Fextend\u002Fconsumer-recipes","6.extend\u002F3.consumer-recipes","i-lucide-chef-hat",{"title":477,"path":478,"stem":479,"icon":452},"Plugins","\u002Fextend\u002Fplugins","6.extend\u002F4.plugins",{"title":481,"path":482,"stem":483,"icon":438},"Custom enrichers","\u002Fextend\u002Fcustom-enrichers","6.extend\u002F5.custom-enrichers",{"title":485,"path":486,"stem":487,"icon":64},"Tail sampling","\u002Fextend\u002Ftail-sampling","6.extend\u002F6.tail-sampling",{"title":489,"path":490,"stem":491,"icon":492},"Identity headers","\u002Fextend\u002Fidentity-headers","6.extend\u002F7.identity-headers","i-lucide-fingerprint",{"title":494,"path":495,"stem":496,"icon":497},"Custom drains","\u002Fextend\u002Fcustom-drains","6.extend\u002F8.custom-drains","i-lucide-share-2",{"title":499,"path":500,"stem":501,"icon":502},"Drain pipeline","\u002Fextend\u002Fdrain-pipeline","6.extend\u002F9.drain-pipeline","i-lucide-workflow",{"title":431,"path":504,"stem":505,"children":506,"page":29},"\u002Freference","7.reference",[507,511,516,519,524,528,533,537],{"title":36,"path":508,"stem":509,"icon":510},"\u002Freference\u002Foverview","7.reference\u002F0.overview","i-lucide-book-marked",{"title":512,"path":513,"stem":514,"icon":515},"Configuration","\u002Freference\u002Fconfiguration","7.reference\u002F1.configuration","i-lucide-settings",{"title":378,"path":517,"stem":518,"icon":107},"\u002Freference\u002Fperformance","7.reference\u002F2.performance",{"title":520,"path":521,"stem":522,"icon":523},"Vite Plugin","\u002Freference\u002Fvite-plugin","7.reference\u002F3.vite-plugin","i-custom-vite",{"title":525,"path":526,"stem":527,"icon":383},"Best Practices","\u002Freference\u002Fbest-practices","7.reference\u002F4.best-practices",{"title":529,"path":530,"stem":531,"icon":532},"vs Other Loggers","\u002Freference\u002Fvs-other-loggers","7.reference\u002F5.vs-other-loggers","i-lucide-scale",{"title":534,"path":535,"stem":536,"icon":438},"Agent Skills","\u002Freference\u002Fagent-skills","7.reference\u002F6.agent-skills",{"title":538,"path":539,"stem":540,"icon":541},"Cost","\u002Freference\u002Fcost","7.reference\u002F7.cost","i-lucide-receipt",{"title":543,"path":544,"stem":545,"children":546,"page":29},"Compare","\u002Fcompare","8.compare",[547,551,555,559,563],{"title":548,"path":549,"stem":550,"icon":532},"evlog vs Pino","\u002Fcompare\u002Fpino","8.compare\u002F1.pino",{"title":552,"path":553,"stem":554,"icon":199},"evlog vs OpenTelemetry","\u002Fcompare\u002Fopentelemetry","8.compare\u002F2.opentelemetry",{"title":556,"path":557,"stem":558,"icon":532},"evlog vs LogTape","\u002Fcompare\u002Flogtape","8.compare\u002F3.logtape",{"title":560,"path":561,"stem":562,"icon":532},"evlog vs Winston: formats and request events","\u002Fcompare\u002Fwinston","8.compare\u002F4.winston",{"title":564,"path":565,"stem":566,"icon":532},"evlog vs Consola: reporters and request context","\u002Fcompare\u002Fconsola","8.compare\u002F5.consola",{"id":568,"title":454,"body":569,"description":2107,"extension":2108,"links":2109,"meta":2110,"navigation":2111,"path":455,"seo":2112,"stem":456,"__hash__":2113},"docs\u002F6.extend\u002F1.stream.md",{"type":570,"value":571,"toc":2094},"minimark",[572,581,605,620,624,627,632,709,1028,1032,1119,1128,1132,1135,1144,1150,1220,1224,1230,1268,1271,1275,1544,1557,1561,1564,1580,1583,1655,1658,1713,1717,1723,1811,1977,1981,2073,2077,2090],[573,574,575,576,580],"p",{},"evlog ships a ",[577,578,579],"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:",[582,583,584,596],"ul",{},[585,586,587,590,591,595],"li",{},[577,588,589],{},"In-process bus",": ",[592,593,594],"code",{},"createStreamDrain()",", the canonical pub\u002Fsub. Sync listeners, async iterators, ring-buffered replay.",[585,597,598,590,601,604],{},[577,599,600],{},"Network bridge",[592,602,603],{},"startStreamServer()",", an opt-in HTTP mini-server that exposes the in-process bus over Server-Sent Events for browsers, CLIs, or external devtools.",[606,607,608,611,612,615,616,619],"callout",{"icon":372},[577,609,610],{},"Local-only by design."," Both layers live inside a single Node \u002F Bun \u002F Deno process. They work in ",[592,613,614],{},"pnpm dev",", on long-lived self-hosted servers, on VMs and containers (Fly, Railway, Coolify…). They do ",[577,617,618],{},"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.",[621,622,589],"h2",{"id":623},"in-process-bus",[625,626],"stream-bus",{},[573,628,629,631],{},[592,630,594],{}," 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.",[633,634,637,640,700],"prompt",{":actions":635,"description":636,"icon":457},"[\"copy\",\"cursor\",\"claude\"]","Subscribe to wide events in-process",[573,638,639],{},"Wire an in-process subscriber on top of evlog's stream drain.",[582,641,642,653,668,679,686,697],{},[585,643,644,645,648,649,652],{},"Import ",[592,646,647],{},"createStreamDrain"," from ",[592,650,651],{},"evlog\u002Fstream"," and call it once at app boot",[585,654,655,656,659,660,663,664,667],{},"Register the returned ",[592,657,658],{},"drain"," on the evlog drain hook for my framework (Nitro: ",[592,661,662],{},"nitroApp.hooks.hook('evlog:drain', stream.drain)","; Next\u002Fstandalone: pass to ",[592,665,666],{},"initLogger({ drain })",")",[585,669,670,671,674,675,678],{},"Subscribe with ",[592,672,673],{},"stream.subscribe((event) => ...)"," for sync listeners or ",[592,676,677],{},"for await (const event of stream.events())"," for async iteration",[585,680,681,682,685],{},"Seed history for late subscribers with ",[592,683,684],{},"stream.recent()"," (snapshot of the ring buffer) before opening the live iterator",[585,687,688,689,692,693,696],{},"Tune ",[592,690,691],{},"buffer"," for replay history and ",[592,694,695],{},"perSubscriberQueue"," for slow-consumer backpressure",[585,698,699],{},"Skip on serverless platforms. The stream is in-process, so isolated invocations won't share it",[573,701,702,703],{},"Docs: ",[704,705,706],"a",{"href":706,"rel":707},"https:\u002F\u002Fwww.evlog.dev\u002Fextend\u002Fstream",[708],"nofollow",[710,711,716],"pre",{"className":712,"code":713,"language":714,"meta":715,"style":715},"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","",[592,717,718,750,757,795,800,838,843,876,914,922,931,936,965,978,984,1012,1023],{"__ignoreMap":715},[719,720,723,727,731,735,738,741,744,747],"span",{"class":721,"line":722},"line",1,[719,724,726],{"class":725},"s7zQu","import",[719,728,730],{"class":729},"sMK4o"," {",[719,732,734],{"class":733},"sTEyZ"," createStreamDrain",[719,736,737],{"class":729}," }",[719,739,740],{"class":725}," from",[719,742,743],{"class":729}," '",[719,745,651],{"class":746},"sfazB",[719,748,749],{"class":729},"'\n",[719,751,753],{"class":721,"line":752},2,[719,754,756],{"emptyLinePlaceholder":755},true,"\n",[719,758,760,764,767,770,773,776,779,783,786,790,792],{"class":721,"line":759},3,[719,761,763],{"class":762},"spNyl","const",[719,765,766],{"class":733}," stream ",[719,768,769],{"class":729},"=",[719,771,734],{"class":772},"s2Zo4",[719,774,775],{"class":733},"(",[719,777,778],{"class":729},"{",[719,780,782],{"class":781},"swJcz"," buffer",[719,784,785],{"class":729},":",[719,787,789],{"class":788},"sbssI"," 200",[719,791,737],{"class":729},[719,793,794],{"class":733},")\n",[719,796,798],{"class":721,"line":797},4,[719,799,756],{"emptyLinePlaceholder":755},[719,801,803,806,809,812,814,817,819,822,825,827,830,833,835],{"class":721,"line":802},5,[719,804,805],{"class":733},"nitroApp",[719,807,808],{"class":729},".",[719,810,811],{"class":733},"hooks",[719,813,808],{"class":729},[719,815,816],{"class":772},"hook",[719,818,775],{"class":733},[719,820,821],{"class":729},"'",[719,823,824],{"class":746},"evlog:drain",[719,826,821],{"class":729},[719,828,829],{"class":729},",",[719,831,832],{"class":733}," stream",[719,834,808],{"class":729},[719,836,837],{"class":733},"drain)\n",[719,839,841],{"class":721,"line":840},6,[719,842,756],{"emptyLinePlaceholder":755},[719,844,846,848,851,853,855,857,860,862,864,868,870,873],{"class":721,"line":845},7,[719,847,763],{"class":762},[719,849,850],{"class":733}," off ",[719,852,769],{"class":729},[719,854,832],{"class":733},[719,856,808],{"class":729},[719,858,859],{"class":772},"subscribe",[719,861,775],{"class":733},[719,863,775],{"class":729},[719,865,867],{"class":866},"sHdIc","event",[719,869,667],{"class":729},[719,871,872],{"class":762}," =>",[719,874,875],{"class":729}," {\n",[719,877,879,882,885,887,889,892,895,897,900,902,905,908,910,912],{"class":721,"line":878},8,[719,880,881],{"class":725},"  if",[719,883,884],{"class":781}," (",[719,886,867],{"class":733},[719,888,808],{"class":729},[719,890,891],{"class":733},"level",[719,893,894],{"class":729}," ===",[719,896,743],{"class":729},[719,898,899],{"class":746},"error",[719,901,821],{"class":729},[719,903,904],{"class":781},") ",[719,906,907],{"class":772},"notify",[719,909,775],{"class":781},[719,911,867],{"class":733},[719,913,794],{"class":781},[719,915,917,920],{"class":721,"line":916},9,[719,918,919],{"class":729},"}",[719,921,794],{"class":733},[719,923,925,928],{"class":721,"line":924},10,[719,926,927],{"class":772},"off",[719,929,930],{"class":733},"()\n",[719,932,934],{"class":721,"line":933},11,[719,935,756],{"emptyLinePlaceholder":755},[719,937,939,942,944,946,949,952,954,956,959,962],{"class":721,"line":938},12,[719,940,941],{"class":725},"for",[719,943,884],{"class":733},[719,945,763],{"class":762},[719,947,948],{"class":733}," past ",[719,950,951],{"class":729},"of",[719,953,832],{"class":733},[719,955,808],{"class":729},[719,957,958],{"class":772},"recent",[719,960,961],{"class":733},"()) ",[719,963,964],{"class":729},"{\n",[719,966,968,971,973,976],{"class":721,"line":967},13,[719,969,970],{"class":772},"  bootstrap",[719,972,775],{"class":781},[719,974,975],{"class":733},"past",[719,977,794],{"class":781},[719,979,981],{"class":721,"line":980},14,[719,982,983],{"class":729},"}\n",[719,985,987,989,992,994,996,999,1001,1003,1005,1008,1010],{"class":721,"line":986},15,[719,988,941],{"class":725},[719,990,991],{"class":725}," await",[719,993,884],{"class":733},[719,995,763],{"class":762},[719,997,998],{"class":733}," event ",[719,1000,951],{"class":729},[719,1002,832],{"class":733},[719,1004,808],{"class":729},[719,1006,1007],{"class":772},"events",[719,1009,961],{"class":733},[719,1011,964],{"class":729},[719,1013,1015,1017,1019,1021],{"class":721,"line":1014},16,[719,1016,970],{"class":772},[719,1018,775],{"class":781},[719,1020,867],{"class":733},[719,1022,794],{"class":781},[719,1024,1026],{"class":721,"line":1025},17,[719,1027,983],{"class":729},[1029,1030,341],"h3",{"id":1031},"options",[1033,1034,1035,1051],"table",{},[1036,1037,1038],"thead",{},[1039,1040,1041,1045,1048],"tr",{},[1042,1043,1044],"th",{},"Option",[1042,1046,1047],{},"Type",[1042,1049,1050],{},"Description",[1052,1053,1054,1080,1100],"tbody",{},[1039,1055,1056,1061,1066],{},[1057,1058,1059],"td",{},[592,1060,691],{},[1057,1062,1063],{},[592,1064,1065],{},"number",[1057,1067,1068,1069,1072,1073,1076,1077,808],{},"Ring-buffer size for ",[592,1070,1071],{},"recent()"," snapshots. Set to ",[592,1074,1075],{},"0"," to disable. Default: ",[592,1078,1079],{},"500",[1039,1081,1082,1086,1090],{},[1057,1083,1084],{},[592,1085,695],{},[1057,1087,1088],{},[592,1089,1065],{},[1057,1091,1092,1093,1096,1097,808],{},"Max queued events per ",[592,1094,1095],{},"events()"," async iterator before the oldest are dropped. The drain itself is never blocked. Default: ",[592,1098,1099],{},"1000",[1039,1101,1102,1107,1112],{},[1057,1103,1104],{},[592,1105,1106],{},"filter",[1057,1108,1109],{},[592,1110,1111],{},"(event) => boolean",[1057,1113,1114,1115,1118],{},"Optional predicate run on each drained event — return ",[592,1116,1117],{},"false"," to skip the event entirely (neither buffered nor delivered).",[573,1120,1121,1124,1125,1127],{},[592,1122,1123],{},"stream.drain(events)"," accepts either a single event or a batch. ",[592,1126,684],{}," returns a snapshot of the buffered events (oldest first, most recent last) for ad-hoc inspection or to seed a UI panel.",[621,1129,1131],{"id":1130},"network-bridge-stream-server","Network bridge: stream server",[1133,1134],"sse-wire",{},[573,1136,1137,1139,1140,1143],{},[592,1138,603],{}," boots a tiny ",[592,1141,1142],{},"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.",[606,1145,1146,1149],{"icon":372},[577,1147,1148],{},"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.",[633,1151,1154,1157,1215],{":actions":635,"description":1152,"icon":1153},"Expose the evlog stream over SSE","i-lucide-radio",[573,1155,1156],{},"Turn on the local stream server so I can subscribe to wide events from a browser tab, CLI, or Tauri\u002FElectron devtool.",[582,1158,1159,1183,1190,1201,1212],{},[585,1160,1161,1162,1165,1166,1169,1170,1165,1173,1176,1177,1179,1180,1182],{},"Detect my framework and opt in explicitly (Nuxt: ",[592,1163,1164],{},"evlog.stream: true"," in ",[592,1167,1168],{},"nuxt.config.ts","; Next.js: ",[592,1171,1172],{},"defineStreamedInstrumentation({ stream: true })",[592,1174,1175],{},"instrumentation.ts","; Hono\u002FExpress\u002FFastify\u002FElysia\u002Fstandalone: call ",[592,1178,603],{}," once at boot and register the returned ",[592,1181,658],{}," on the evlog drain hook)",[585,1184,1185,1186,1189],{},"Never enable in production by default; gate it behind ",[592,1187,1188],{},"process.env.NODE_ENV !== 'production'"," or a feature flag",[585,1191,1192,1193,1196,1197,1200],{},"For shared dev environments, set ",[592,1194,1195],{},"token: process.env.EVLOG_STREAM_TOKEN"," and have the consumer send it as ",[592,1198,1199],{},"Authorization: Bearer \u003Ctoken>"," on every request",[585,1202,1203,1204,1207,1208,1211],{},"Discover the URL from ",[592,1205,1206],{},".evlog\u002Fstream.url"," (or ",[592,1209,1210],{},"\u002Fapi\u002F_evlog\u002Fstream-info"," on Nuxt), and never hard-code the port, which is ephemeral",[585,1213,1214],{},"Skip on serverless platforms. The server is in-process",[573,1216,702,1217],{},[704,1218,706],{"href":706,"rel":1219},[708],[1029,1221,1223],{"id":1222},"what-boots-up","What boots up",[573,1225,1226,1227,1229],{},"When you opt in, evlog calls ",[592,1228,603],{}," and:",[1231,1232,1233,1236,1246,1251,1254,1257],"ol",{},[585,1234,1235],{},"Picks an ephemeral free port (or the one you specify)",[585,1237,1238,1239,1241,1242,1245],{},"Spins a tiny ",[592,1240,1142],{}," server on ",[592,1243,1244],{},"127.0.0.1"," (or your host)",[585,1247,1248,1249],{},"Writes the discovered URL to ",[592,1250,1206],{},[585,1252,1253],{},"Prints a one-line banner in the server console",[585,1255,1256],{},"Hooks the in-process stream drain into the evlog pipeline",[585,1258,1259,1260,1263,1264,1267],{},"Exposes ",[592,1261,1262],{},"GET \u002F"," for the SSE stream and ",[592,1265,1266],{},"GET \u002Finfo"," for handshake metadata",[573,1269,1270],{},"On shutdown (SIGINT \u002F SIGTERM \u002F process exit) the server cleans up listeners and removes the URL file.",[1029,1272,1274],{"id":1273},"per-framework-opt-in","Per-framework opt-in",[1276,1277,1278,1360,1429],"code-group",{},[710,1279,1281],{"className":712,"code":1280,"filename":1168,"language":714,"meta":715,"style":715},"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",[592,1282,1283,1298,1321,1330,1343,1349,1354],{"__ignoreMap":715},[719,1284,1285,1288,1291,1294,1296],{"class":721,"line":722},[719,1286,1287],{"class":725},"export",[719,1289,1290],{"class":725}," default",[719,1292,1293],{"class":772}," defineNuxtConfig",[719,1295,775],{"class":733},[719,1297,964],{"class":729},[719,1299,1300,1303,1305,1308,1310,1313,1315,1318],{"class":721,"line":752},[719,1301,1302],{"class":781},"  modules",[719,1304,785],{"class":729},[719,1306,1307],{"class":733}," [",[719,1309,821],{"class":729},[719,1311,1312],{"class":746},"evlog\u002Fnuxt",[719,1314,821],{"class":729},[719,1316,1317],{"class":733},"]",[719,1319,1320],{"class":729},",\n",[719,1322,1323,1326,1328],{"class":721,"line":759},[719,1324,1325],{"class":781},"  evlog",[719,1327,785],{"class":729},[719,1329,875],{"class":729},[719,1331,1332,1335,1337,1341],{"class":721,"line":797},[719,1333,1334],{"class":781},"    stream",[719,1336,785],{"class":729},[719,1338,1340],{"class":1339},"sfNiH"," true",[719,1342,1320],{"class":729},[719,1344,1345],{"class":721,"line":802},[719,1346,1348],{"class":1347},"sHwdD","    \u002F\u002F or: stream: { port: 4444, token: process.env.EVLOG_STREAM_TOKEN }\n",[719,1350,1351],{"class":721,"line":840},[719,1352,1353],{"class":729},"  },\n",[719,1355,1356,1358],{"class":721,"line":845},[719,1357,919],{"class":729},[719,1359,794],{"class":733},[710,1361,1363],{"className":712,"code":1362,"filename":1175,"language":714,"meta":715,"style":715},"import { defineStreamedInstrumentation } from 'evlog\u002Fnext\u002Fstream'\n\nexport const { register } = defineStreamedInstrumentation({\n  stream: true,\n})\n",[592,1364,1365,1385,1389,1412,1423],{"__ignoreMap":715},[719,1366,1367,1369,1371,1374,1376,1378,1380,1383],{"class":721,"line":722},[719,1368,726],{"class":725},[719,1370,730],{"class":729},[719,1372,1373],{"class":733}," defineStreamedInstrumentation",[719,1375,737],{"class":729},[719,1377,740],{"class":725},[719,1379,743],{"class":729},[719,1381,1382],{"class":746},"evlog\u002Fnext\u002Fstream",[719,1384,749],{"class":729},[719,1386,1387],{"class":721,"line":752},[719,1388,756],{"emptyLinePlaceholder":755},[719,1390,1391,1393,1396,1398,1401,1403,1406,1408,1410],{"class":721,"line":759},[719,1392,1287],{"class":725},[719,1394,1395],{"class":762}," const",[719,1397,730],{"class":729},[719,1399,1400],{"class":733}," register ",[719,1402,919],{"class":729},[719,1404,1405],{"class":729}," =",[719,1407,1373],{"class":772},[719,1409,775],{"class":733},[719,1411,964],{"class":729},[719,1413,1414,1417,1419,1421],{"class":721,"line":797},[719,1415,1416],{"class":781},"  stream",[719,1418,785],{"class":729},[719,1420,1340],{"class":1339},[719,1422,1320],{"class":729},[719,1424,1425,1427],{"class":721,"line":802},[719,1426,919],{"class":729},[719,1428,794],{"class":733},[710,1430,1433],{"className":712,"code":1431,"filename":1432,"language":714,"meta":715,"style":715},"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",[592,1434,1435,1454,1458,1515,1535,1540],{"__ignoreMap":715},[719,1436,1437,1439,1441,1444,1446,1448,1450,1452],{"class":721,"line":722},[719,1438,726],{"class":725},[719,1440,730],{"class":729},[719,1442,1443],{"class":733}," startStreamServer",[719,1445,737],{"class":729},[719,1447,740],{"class":725},[719,1449,743],{"class":729},[719,1451,651],{"class":746},[719,1453,749],{"class":729},[719,1455,1456],{"class":721,"line":752},[719,1457,756],{"emptyLinePlaceholder":755},[719,1459,1460,1463,1466,1468,1471,1473,1476,1479,1481,1484,1486,1489,1492,1494,1496,1498,1501,1504,1506,1509,1511,1513],{"class":721,"line":759},[719,1461,1462],{"class":725},"if",[719,1464,1465],{"class":733}," (process",[719,1467,808],{"class":729},[719,1469,1470],{"class":733},"env",[719,1472,808],{"class":729},[719,1474,1475],{"class":733},"NODE_ENV ",[719,1477,1478],{"class":729},"!==",[719,1480,743],{"class":729},[719,1482,1483],{"class":746},"production",[719,1485,821],{"class":729},[719,1487,1488],{"class":729}," &&",[719,1490,1491],{"class":733}," process",[719,1493,808],{"class":729},[719,1495,1470],{"class":733},[719,1497,808],{"class":729},[719,1499,1500],{"class":733},"EVLOG_STREAM ",[719,1502,1503],{"class":729},"===",[719,1505,743],{"class":729},[719,1507,1508],{"class":746},"1",[719,1510,821],{"class":729},[719,1512,904],{"class":733},[719,1514,964],{"class":729},[719,1516,1517,1520,1522,1525,1527,1529,1531,1533],{"class":721,"line":797},[719,1518,1519],{"class":762},"  const",[719,1521,730],{"class":729},[719,1523,1524],{"class":733}," drain",[719,1526,737],{"class":729},[719,1528,1405],{"class":729},[719,1530,991],{"class":725},[719,1532,1443],{"class":772},[719,1534,930],{"class":781},[719,1536,1537],{"class":721,"line":802},[719,1538,1539],{"class":1347},"  \u002F\u002F Plug `drain` into the evlog drain hook for your framework\n",[719,1541,1542],{"class":721,"line":840},[719,1543,983],{"class":729},[573,1545,1546,1547,1549,1550,1553,1554,1556],{},"The Hono \u002F Express \u002F Fastify integrations don't need a \"feature PR\", because ",[592,1548,603],{}," is ",[577,1551,1552],{},"orthogonal"," to your framework. You boot it once and connect its ",[592,1555,658],{}," to the evlog pipeline like any other drain.",[1029,1558,1560],{"id":1559},"discovery","Discovery",[573,1562,1563],{},"The mini-server runs on a random port, so any consumer must discover it.",[710,1565,1567],{"className":712,"code":1566,"filename":1206,"language":714,"meta":715,"style":715},"http:\u002F\u002F127.0.0.1:53942\n",[592,1568,1569],{"__ignoreMap":715},[719,1570,1571,1575,1577],{"class":721,"line":722},[719,1572,1574],{"class":1573},"sBMFI","http",[719,1576,785],{"class":729},[719,1578,1579],{"class":1347},"\u002F\u002F127.0.0.1:53942\n",[573,1581,1582],{},"Read directly from disk:",[710,1584,1586],{"className":712,"code":1585,"language":714,"meta":715,"style":715},"import { readFile } from 'node:fs\u002Fpromises'\n\nconst url = (await readFile('.evlog\u002Fstream.url', 'utf-8')).trim()\n",[592,1587,1588,1608,1612],{"__ignoreMap":715},[719,1589,1590,1592,1594,1597,1599,1601,1603,1606],{"class":721,"line":722},[719,1591,726],{"class":725},[719,1593,730],{"class":729},[719,1595,1596],{"class":733}," readFile",[719,1598,737],{"class":729},[719,1600,740],{"class":725},[719,1602,743],{"class":729},[719,1604,1605],{"class":746},"node:fs\u002Fpromises",[719,1607,749],{"class":729},[719,1609,1610],{"class":721,"line":752},[719,1611,756],{"emptyLinePlaceholder":755},[719,1613,1614,1616,1619,1621,1623,1626,1628,1630,1632,1634,1636,1638,1640,1643,1645,1648,1650,1653],{"class":721,"line":759},[719,1615,763],{"class":762},[719,1617,1618],{"class":733}," url ",[719,1620,769],{"class":729},[719,1622,884],{"class":733},[719,1624,1625],{"class":725},"await",[719,1627,1596],{"class":772},[719,1629,775],{"class":733},[719,1631,821],{"class":729},[719,1633,1206],{"class":746},[719,1635,821],{"class":729},[719,1637,829],{"class":729},[719,1639,743],{"class":729},[719,1641,1642],{"class":746},"utf-8",[719,1644,821],{"class":729},[719,1646,1647],{"class":733},"))",[719,1649,808],{"class":729},[719,1651,1652],{"class":772},"trim",[719,1654,930],{"class":733},[573,1656,1657],{},"Or, for same-origin browser tabs in a Nuxt app, hit the discovery route:",[710,1659,1661],{"className":712,"code":1660,"language":714,"meta":715,"style":715},"const { url } = await fetch('\u002Fapi\u002F_evlog\u002Fstream-info').then(r => r.json())\n",[592,1662,1663],{"__ignoreMap":715},[719,1664,1665,1667,1669,1671,1673,1675,1677,1680,1682,1684,1686,1688,1690,1692,1695,1697,1700,1702,1705,1707,1710],{"class":721,"line":722},[719,1666,763],{"class":762},[719,1668,730],{"class":729},[719,1670,1618],{"class":733},[719,1672,919],{"class":729},[719,1674,1405],{"class":729},[719,1676,991],{"class":725},[719,1678,1679],{"class":772}," fetch",[719,1681,775],{"class":733},[719,1683,821],{"class":729},[719,1685,1210],{"class":746},[719,1687,821],{"class":729},[719,1689,667],{"class":733},[719,1691,808],{"class":729},[719,1693,1694],{"class":772},"then",[719,1696,775],{"class":733},[719,1698,1699],{"class":866},"r",[719,1701,872],{"class":762},[719,1703,1704],{"class":733}," r",[719,1706,808],{"class":729},[719,1708,1709],{"class":772},"json",[719,1711,1712],{"class":733},"())\n",[1029,1714,1716],{"id":1715},"wire-format","Wire format",[573,1718,1719,1720,785],{},"Every SSE message has the shape ",[592,1721,1722],{},"{ evlog: '1', type, data }",[1033,1724,1725,1742],{},[1036,1726,1727],{},[1039,1728,1729,1734,1737],{},[1042,1730,1731],{},[592,1732,1733],{},"type",[1042,1735,1736],{},"When",[1042,1738,1739],{},[592,1740,1741],{},"data",[1052,1743,1744,1759,1780,1793],{},[1039,1745,1746,1751,1754],{},[1057,1747,1748],{},[592,1749,1750],{},"hello",[1057,1752,1753],{},"First frame after connect",[1057,1755,1756],{},[592,1757,1758],{},"{ evlogVersion, bufferSize, heartbeatMs }",[1039,1760,1761,1766,1775],{},[1057,1762,1763],{},[592,1764,1765],{},"replay",[1057,1767,1768,1769,1771,1772],{},"Right after ",[592,1770,1750],{},", replays buffered events when the consumer passed ",[592,1773,1774],{},"?since=\u003Ciso>",[1057,1776,1777],{},[592,1778,1779],{},"WideEvent",[1039,1781,1782,1786,1789],{},[1057,1783,1784],{},[592,1785,867],{},[1057,1787,1788],{},"Every emitted event after that",[1057,1790,1791],{},[592,1792,1779],{},[1039,1794,1795,1800,1806],{},[1057,1796,1797],{},[592,1798,1799],{},"ping",[1057,1801,1802,1803,667],{},"Heartbeat (default every 15s, configurable via ",[592,1804,1805],{},"heartbeatMs",[1057,1807,1808],{},[592,1809,1810],{},"{ ts: number }",[710,1812,1815],{"className":712,"code":1813,"filename":1814,"language":714,"meta":715,"style":715},"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",[592,1816,1817,1861,1879,1883,1906,1942,1973],{"__ignoreMap":715},[719,1818,1819,1821,1823,1825,1827,1829,1831,1833,1835,1837,1839,1841,1843,1845,1847,1849,1851,1853,1855,1857,1859],{"class":721,"line":722},[719,1820,763],{"class":762},[719,1822,730],{"class":729},[719,1824,1618],{"class":733},[719,1826,919],{"class":729},[719,1828,1405],{"class":729},[719,1830,991],{"class":725},[719,1832,1679],{"class":772},[719,1834,775],{"class":733},[719,1836,821],{"class":729},[719,1838,1210],{"class":746},[719,1840,821],{"class":729},[719,1842,667],{"class":733},[719,1844,808],{"class":729},[719,1846,1694],{"class":772},[719,1848,775],{"class":733},[719,1850,1699],{"class":866},[719,1852,872],{"class":762},[719,1854,1704],{"class":733},[719,1856,808],{"class":729},[719,1858,1709],{"class":772},[719,1860,1712],{"class":733},[719,1862,1863,1865,1868,1870,1873,1876],{"class":721,"line":752},[719,1864,763],{"class":762},[719,1866,1867],{"class":733}," es ",[719,1869,769],{"class":729},[719,1871,1872],{"class":729}," new",[719,1874,1875],{"class":772}," EventSource",[719,1877,1878],{"class":733},"(url)\n",[719,1880,1881],{"class":721,"line":759},[719,1882,756],{"emptyLinePlaceholder":755},[719,1884,1885,1888,1890,1893,1895,1897,1900,1902,1904],{"class":721,"line":797},[719,1886,1887],{"class":733},"es",[719,1889,808],{"class":729},[719,1891,1892],{"class":772},"onmessage",[719,1894,1405],{"class":729},[719,1896,884],{"class":729},[719,1898,1899],{"class":866},"msg",[719,1901,667],{"class":729},[719,1903,872],{"class":762},[719,1905,875],{"class":729},[719,1907,1908,1910,1912,1915,1917,1920,1922,1924,1927,1929,1932,1934,1936,1938,1940],{"class":721,"line":802},[719,1909,1519],{"class":762},[719,1911,730],{"class":729},[719,1913,1914],{"class":733}," type",[719,1916,829],{"class":729},[719,1918,1919],{"class":733}," data",[719,1921,737],{"class":729},[719,1923,1405],{"class":729},[719,1925,1926],{"class":733}," JSON",[719,1928,808],{"class":729},[719,1930,1931],{"class":772},"parse",[719,1933,775],{"class":781},[719,1935,1899],{"class":733},[719,1937,808],{"class":729},[719,1939,1741],{"class":733},[719,1941,794],{"class":781},[719,1943,1944,1946,1948,1950,1952,1954,1956,1958,1960,1962,1964,1967,1969,1971],{"class":721,"line":840},[719,1945,881],{"class":725},[719,1947,884],{"class":781},[719,1949,1733],{"class":733},[719,1951,894],{"class":729},[719,1953,743],{"class":729},[719,1955,867],{"class":746},[719,1957,821],{"class":729},[719,1959,904],{"class":781},[719,1961,1007],{"class":733},[719,1963,808],{"class":729},[719,1965,1966],{"class":772},"push",[719,1968,775],{"class":781},[719,1970,1741],{"class":733},[719,1972,794],{"class":781},[719,1974,1975],{"class":721,"line":845},[719,1976,983],{"class":729},[1029,1978,1980],{"id":1979},"auth-cors","Auth + CORS",[1033,1982,1983,1992],{},[1036,1984,1985],{},[1039,1986,1987,1989],{},[1042,1988,1044],{},[1042,1990,1991],{},"Behavior",[1052,1993,1994,2007,2029,2046,2059],{},[1039,1995,1996,2001],{},[1057,1997,1998],{},[592,1999,2000],{},"token",[1057,2002,2003,2004,2006],{},"When set, the server requires ",[592,2005,1199],{}," on every request and 401s otherwise.",[1039,2008,2009,2012],{},[1057,2010,2011],{},"(no token)",[1057,2013,2014,2015,2018,2019,2021,2022,2021,2025,2028],{},"Connections are accepted only when there is no ",[592,2016,2017],{},"Origin"," header or the origin host is local (",[592,2020,1244],{}," \u002F ",[592,2023,2024],{},"localhost",[592,2026,2027],{},"[::1]","). Other origins receive 403.",[1039,2030,2031,2036],{},[1057,2032,2033],{},[592,2034,2035],{},"host",[1057,2037,2038,2039,2041,2042,2045],{},"Default ",[592,2040,1244],{}," — never reachable from the LAN. Override to ",[592,2043,2044],{},"0.0.0.0"," only with a token set.",[1039,2047,2048,2052],{},[1057,2049,2050],{},[592,2051,1805],{},[1057,2053,2054,2055,2058],{},"Heartbeat interval (default ",[592,2056,2057],{},"15000",").",[1039,2060,2061,2065],{},[1057,2062,2063],{},[592,2064,691],{},[1057,2066,2067,2068,2070,2071,808],{},"Ring buffer kept on the underlying default stream — replayed for late-joining clients via ",[592,2069,1774],{},". Default ",[592,2072,1079],{},[621,2074,2076],{"id":2075},"going-further","Going further",[582,2078,2079,2084],{},[585,2080,2081,2083],{},[704,2082,468],{"href":469},": replay or tail historic NDJSON files (cross-process, survives restarts)",[585,2085,2086,2089],{},[704,2087,2088],{"href":473},"Consumer recipes",": build a minimal devtool, pipe to curl + jq, replay history then go live",[2091,2092,2093],"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":715,"searchDepth":752,"depth":752,"links":2095},[2096,2099,2106],{"id":623,"depth":752,"text":589,"children":2097},[2098],{"id":1031,"depth":759,"text":341},{"id":1130,"depth":752,"text":1131,"children":2100},[2101,2102,2103,2104,2105],{"id":1222,"depth":759,"text":1223},{"id":1273,"depth":759,"text":1274},{"id":1559,"depth":759,"text":1560},{"id":1715,"depth":759,"text":1716},{"id":1979,"depth":759,"text":1980},{"id":2075,"depth":752,"text":2076},"Subscribe to wide events flowing through evlog — in-process with createStreamDrain, or over the network with the local SSE stream server.","md",null,{},{"title":454,"icon":457},{"title":454,"description":2107},"awgcJwxj8IvIwn0X-16ptW8hwlFTuLdsNWk3RbpW2wU",[2115,2117],{"title":36,"path":450,"stem":451,"description":2116,"icon":452,"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":459,"path":460,"stem":461,"description":2118,"icon":462,"children":-1},"Build evlog support for a framework or runtime that has no integration, with defineFrameworkIntegration or the lower-level helpers.",1788966805220]