[{"data":1,"prerenderedAt":962},["ShallowReactive",2],{"navigation_docs":3,"-build-on-top-overview":429,"-build-on-top-overview-surround":957},[4,35,159,201,289,326,413],{"title":5,"path":6,"stem":7,"children":8,"page":34},"Getting Started","\u002Fgetting-started","1.getting-started",[9,14,19,24,29],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-info",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quick Start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start","i-lucide-zap",{"title":25,"path":26,"stem":27,"icon":28},"Agent Skills","\u002Fgetting-started\u002Fagent-skills","1.getting-started\u002F4.agent-skills","i-lucide-sparkles",{"title":30,"path":31,"stem":32,"icon":33},"vs Other Loggers","\u002Fgetting-started\u002Fvs-other-loggers","1.getting-started\u002F5.vs-other-loggers","i-lucide-scale",false,{"title":36,"path":37,"stem":38,"children":39,"page":34},"Logging","\u002Flogging","2.logging",[40,45,50,55,60,65,70,99,127],{"title":41,"path":42,"stem":43,"icon":44},"Overview","\u002Flogging\u002Foverview","2.logging\u002F0.overview","i-lucide-list",{"title":46,"path":47,"stem":48,"icon":49},"Simple Logging","\u002Flogging\u002Fsimple-logging","2.logging\u002F1.simple-logging","i-lucide-terminal",{"title":51,"path":52,"stem":53,"icon":54},"Wide Events","\u002Flogging\u002Fwide-events","2.logging\u002F2.wide-events","i-lucide-layers",{"title":56,"path":57,"stem":58,"icon":59},"Structured Errors","\u002Flogging\u002Fstructured-errors","2.logging\u002F3.structured-errors","i-lucide-shield-alert",{"title":61,"path":62,"stem":63,"icon":64},"Catalogs","\u002Flogging\u002Fcatalogs","2.logging\u002F4.catalogs","i-lucide-book-open",{"title":66,"path":67,"stem":68,"icon":69},"Client Logging","\u002Flogging\u002Fclient-logging","2.logging\u002F5.client-logging","i-lucide-monitor",{"title":71,"icon":72,"path":73,"stem":74,"children":75,"page":34},"AI SDK","i-simple-icons-vercel","\u002Flogging\u002Fai-sdk","2.logging\u002F6.ai-sdk",[76,79,84,89,94],{"title":41,"path":77,"stem":78,"icon":44},"\u002Flogging\u002Fai-sdk\u002Foverview","2.logging\u002F6.ai-sdk\u002F01.overview",{"title":80,"path":81,"stem":82,"icon":83},"Usage","\u002Flogging\u002Fai-sdk\u002Fusage","2.logging\u002F6.ai-sdk\u002F02.usage","i-lucide-code",{"title":85,"path":86,"stem":87,"icon":88},"Options","\u002Flogging\u002Fai-sdk\u002Foptions","2.logging\u002F6.ai-sdk\u002F03.options","i-lucide-sliders",{"title":90,"path":91,"stem":92,"icon":93},"Metadata","\u002Flogging\u002Fai-sdk\u002Fmetadata","2.logging\u002F6.ai-sdk\u002F04.metadata","i-lucide-database",{"title":95,"path":96,"stem":97,"icon":98},"Telemetry","\u002Flogging\u002Fai-sdk\u002Ftelemetry","2.logging\u002F6.ai-sdk\u002F05.telemetry","i-lucide-activity",{"title":100,"icon":101,"path":102,"stem":103,"children":104,"page":34},"Better Auth","i-simple-icons-betterauth","\u002Flogging\u002Fbetter-auth","2.logging\u002F7.better-auth",[105,108,113,118,122],{"title":41,"path":106,"stem":107,"icon":44},"\u002Flogging\u002Fbetter-auth\u002Foverview","2.logging\u002F7.better-auth\u002F01.overview",{"title":109,"path":110,"stem":111,"icon":112},"Identify User","\u002Flogging\u002Fbetter-auth\u002Fidentify-user","2.logging\u002F7.better-auth\u002F02.identify-user","i-lucide-user-check",{"title":114,"path":115,"stem":116,"icon":117},"Middleware","\u002Flogging\u002Fbetter-auth\u002Fmiddleware","2.logging\u002F7.better-auth\u002F03.middleware","i-lucide-shield",{"title":119,"path":120,"stem":121,"icon":69},"Client Sync","\u002Flogging\u002Fbetter-auth\u002Fclient-sync","2.logging\u002F7.better-auth\u002F04.client-sync",{"title":123,"path":124,"stem":125,"icon":126},"Performance","\u002Flogging\u002Fbetter-auth\u002Fperformance","2.logging\u002F7.better-auth\u002F05.performance","i-lucide-gauge",{"title":128,"icon":129,"path":130,"stem":131,"children":132,"page":34},"Audit Logs","i-lucide-shield-check","\u002Flogging\u002Faudit","2.logging\u002F8.audit",[133,136,141,146,151,155],{"title":41,"path":134,"stem":135,"icon":44},"\u002Flogging\u002Faudit\u002Foverview","2.logging\u002F8.audit\u002F01.overview",{"title":137,"path":138,"stem":139,"icon":140},"Schema","\u002Flogging\u002Faudit\u002Fschema","2.logging\u002F8.audit\u002F02.schema","i-lucide-file-text",{"title":142,"path":143,"stem":144,"icon":145},"Recording","\u002Flogging\u002Faudit\u002Frecording","2.logging\u002F8.audit\u002F03.recording","i-lucide-pen-line",{"title":147,"path":148,"stem":149,"icon":150},"Drains","\u002Flogging\u002Faudit\u002Fpipeline","2.logging\u002F8.audit\u002F04.pipeline","i-lucide-link",{"title":152,"path":153,"stem":154,"icon":129},"Compliance","\u002Flogging\u002Faudit\u002Fcompliance","2.logging\u002F8.audit\u002F05.compliance",{"title":156,"path":157,"stem":158,"icon":64},"Recipes","\u002Flogging\u002Faudit\u002Frecipes","2.logging\u002F8.audit\u002F06.recipes",{"title":160,"path":161,"stem":162,"children":163,"page":34},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[164,169,174,179,184,188,191,196],{"title":165,"path":166,"stem":167,"icon":168},"Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":170,"path":171,"stem":172,"icon":173},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F1.configuration","i-lucide-settings",{"title":175,"path":176,"stem":177,"icon":178},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F2.sampling","i-lucide-filter",{"title":180,"path":181,"stem":182,"icon":183},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F3.typed-fields","i-simple-icons-typescript",{"title":185,"path":186,"stem":187,"icon":129},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F4.best-practices",{"title":123,"path":189,"stem":190,"icon":126},"\u002Fcore-concepts\u002Fperformance","3.core-concepts\u002F5.performance",{"title":192,"path":193,"stem":194,"icon":195},"Vite Plugin","\u002Fcore-concepts\u002Fvite-plugin","3.core-concepts\u002F6.vite-plugin","i-custom-vite",{"title":197,"path":198,"stem":199,"icon":200},"Auto-Redaction","\u002Fcore-concepts\u002Fredaction","3.core-concepts\u002F7.redaction","i-lucide-eye-off",{"title":202,"path":203,"stem":204,"children":205,"page":34},"Frameworks","\u002Fframeworks","4.frameworks",[206,210,215,220,225,230,235,240,245,250,255,260,265,270,274,279,284],{"title":41,"path":207,"stem":208,"icon":209},"\u002Fframeworks\u002Foverview","4.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":211,"path":212,"stem":213,"icon":214},"Nuxt","\u002Fframeworks\u002Fnuxt","4.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":216,"path":217,"stem":218,"icon":219},"Next.js","\u002Fframeworks\u002Fnextjs","4.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":221,"path":222,"stem":223,"icon":224},"SvelteKit","\u002Fframeworks\u002Fsveltekit","4.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":226,"path":227,"stem":228,"icon":229},"Nitro","\u002Fframeworks\u002Fnitro","4.frameworks\u002F04.nitro","i-custom-nitro",{"title":231,"path":232,"stem":233,"icon":234},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","4.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":236,"path":237,"stem":238,"icon":239},"NestJS","\u002Fframeworks\u002Fnestjs","4.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":241,"path":242,"stem":243,"icon":244},"Express","\u002Fframeworks\u002Fexpress","4.frameworks\u002F07.express","i-simple-icons-express",{"title":246,"path":247,"stem":248,"icon":249},"Hono","\u002Fframeworks\u002Fhono","4.frameworks\u002F08.hono","i-simple-icons-hono",{"title":251,"path":252,"stem":253,"icon":254},"Fastify","\u002Fframeworks\u002Ffastify","4.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":256,"path":257,"stem":258,"icon":259},"Elysia","\u002Fframeworks\u002Felysia","4.frameworks\u002F10.elysia","i-custom-elysia",{"title":261,"path":262,"stem":263,"icon":264},"React Router","\u002Fframeworks\u002Freact-router","4.frameworks\u002F11.react-router","i-custom-reactrouter",{"title":266,"path":267,"stem":268,"icon":269},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","4.frameworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":271,"path":272,"stem":273,"icon":183},"Standalone","\u002Fframeworks\u002Fstandalone","4.frameworks\u002F13.standalone",{"title":275,"path":276,"stem":277,"icon":278},"Astro","\u002Fframeworks\u002Fastro","4.frameworks\u002F14.astro","i-simple-icons-astro",{"title":280,"path":281,"stem":282,"icon":283},"AWS Lambda","\u002Fframeworks\u002Faws-lambda","4.frameworks\u002F16.aws-lambda","i-custom-lambda",{"title":285,"path":286,"stem":287,"icon":288},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","4.frameworks\u002F17.custom-integration","i-lucide-puzzle",{"title":290,"path":291,"stem":292,"children":293,"page":34},"Build on top","\u002Fbuild-on-top","5.build-on-top",[294,297,302,307,312,317,321],{"title":41,"path":295,"stem":296,"icon":54},"\u002Fbuild-on-top\u002Foverview","5.build-on-top\u002F0.overview",{"title":298,"path":299,"stem":300,"icon":301},"Stream API","\u002Fbuild-on-top\u002Fstream-api","5.build-on-top\u002F1.stream-api","i-lucide-radio-tower",{"title":303,"path":304,"stem":305,"icon":306},"Stream server","\u002Fbuild-on-top\u002Fstream-server","5.build-on-top\u002F2.stream-server","i-lucide-radio",{"title":308,"path":309,"stem":310,"icon":311},"FS reader","\u002Fbuild-on-top\u002Ffs-reader","5.build-on-top\u002F3.fs-reader","i-lucide-folder-search",{"title":313,"path":314,"stem":315,"icon":316},"Identity headers","\u002Fbuild-on-top\u002Fidentity-headers","5.build-on-top\u002F4.identity-headers","i-lucide-fingerprint",{"title":156,"path":318,"stem":319,"icon":320},"\u002Fbuild-on-top\u002Frecipes","5.build-on-top\u002F5.recipes","i-lucide-chef-hat",{"title":322,"path":323,"stem":324,"icon":325},"Catalogs as packages","\u002Fbuild-on-top\u002Fcatalogs-as-packages","5.build-on-top\u002F6.catalogs-as-packages","i-lucide-package",{"title":327,"path":328,"stem":329,"children":330,"page":34},"Adapters","\u002Fadapters","6.adapters",[331,334,374,389],{"title":41,"path":332,"stem":333,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":335,"path":336,"stem":337,"children":338,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[339,344,349,354,359,364,369],{"title":340,"path":341,"stem":342,"icon":343},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":345,"path":346,"stem":347,"icon":348},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":350,"path":351,"stem":352,"icon":353},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":355,"path":356,"stem":357,"icon":358},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":360,"path":361,"stem":362,"icon":363},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":365,"path":366,"stem":367,"icon":368},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":370,"path":371,"stem":372,"icon":373},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":375,"path":376,"stem":377,"children":378,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[379,384],{"title":380,"path":381,"stem":382,"icon":383},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":385,"path":386,"stem":387,"icon":388},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":390,"path":391,"stem":392,"children":393,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[394,399,404,408],{"title":395,"path":396,"stem":397,"icon":398},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline","i-lucide-workflow",{"title":400,"path":401,"stem":402,"icon":403},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":405,"path":406,"stem":407,"icon":83},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":409,"path":410,"stem":411,"icon":412},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":414,"path":415,"stem":416,"children":417,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[418,421,425],{"title":41,"path":419,"stem":420,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":422,"path":423,"stem":424,"icon":288},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":426,"path":427,"stem":428,"icon":83},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":430,"title":431,"body":432,"description":950,"extension":951,"links":952,"meta":953,"navigation":954,"path":295,"seo":955,"stem":296,"__hash__":956},"docs\u002F5.build-on-top\u002F0.overview.md","Build on top of evlog",{"type":433,"value":434,"toc":945},"minimark",[435,444,461,475,656,661,766,770,773,913,917,928,935,941],[436,437,438,439,443],"p",{},"evlog is designed to be extensible from both ends. There are ",[440,441,442],"strong",{},"two distinct angles"," to \"build on top\" — and they answer different questions:",[445,446,448,458],"callout",{"icon":447},"i-lucide-eye",[436,449,450,453,454],{},[440,451,452],{},"Observe"," — ",[455,456,457],"em",{},"I want to read what flows through the pipeline.",[436,459,460],{},"Plug a subscriber into evlog and react to wide events live: a devtool, a dashboard, a CLI tail, an analytics console. The events come from your app, you decide what to do with them.",[445,462,464,472],{"icon":463},"i-lucide-plug",[436,465,466,453,469],{},[440,467,468],{},"Extend",[455,470,471],{},"I want to plug something into the pipeline.",[436,473,474],{},"Add custom logic that runs as events flow through evlog itself: enrichers, drains, plugins, error\u002Faudit catalogs you can publish as packages. Your code is part of the pipeline.",[476,477,482],"pre",{"className":478,"code":479,"language":480,"meta":481,"style":481},"language-mermaid shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","flowchart LR\n    App[\"Your app\"] --> Pipeline[\"evlog drain pipeline\"]\n    Pipeline --> Drain[\"Drains\u003Cbr\u002F>(Axiom, Datadog, fs, ...)\"]\n\n    subgraph extend [Extend]\n      direction TB\n      Plugins[\"Plugins\"]\n      Enrichers[\"Enrichers\"]\n      CustomDrains[\"Custom drains\"]\n      Catalogs[\"Error \u002F audit\u003Cbr\u002F>catalogs\"]\n    end\n\n    extend -.->|\"hook into\"| Pipeline\n\n    Pipeline -->|\"events\"| Stream[\"evlog\u002Fstream\u003Cbr\u002F>in-process pub\u002Fsub\"]\n    Stream --> StreamServer[\"mini HTTP server\u003Cbr\u002F>(SSE bridge)\"]\n\n    subgraph observe [Observe]\n      direction TB\n      InProc[\"Sync subscribers\u003Cbr\u002F>(scripts, tests)\"]\n      Browser[\"Browser tab\u003Cbr\u002F>(devtool)\"]\n      Cli[\"CLI \u002F curl\"]\n      FsReader[\"readFsLogs\u003Cbr\u002F>tailFsLogs\"]\n    end\n\n    Stream -.->|\"in-process\"| InProc\n    StreamServer --> Browser\n    StreamServer --> Cli\n    Drain -->|\"fs adapter\"| FsReader\n","mermaid","",[483,484,485,493,499,505,512,518,524,530,536,542,548,554,559,565,570,576,582,587,593,598,604,610,616,622,627,632,638,644,650],"code",{"__ignoreMap":481},[486,487,490],"span",{"class":488,"line":489},"line",1,[486,491,492],{},"flowchart LR\n",[486,494,496],{"class":488,"line":495},2,[486,497,498],{},"    App[\"Your app\"] --> Pipeline[\"evlog drain pipeline\"]\n",[486,500,502],{"class":488,"line":501},3,[486,503,504],{},"    Pipeline --> Drain[\"Drains\u003Cbr\u002F>(Axiom, Datadog, fs, ...)\"]\n",[486,506,508],{"class":488,"line":507},4,[486,509,511],{"emptyLinePlaceholder":510},true,"\n",[486,513,515],{"class":488,"line":514},5,[486,516,517],{},"    subgraph extend [Extend]\n",[486,519,521],{"class":488,"line":520},6,[486,522,523],{},"      direction TB\n",[486,525,527],{"class":488,"line":526},7,[486,528,529],{},"      Plugins[\"Plugins\"]\n",[486,531,533],{"class":488,"line":532},8,[486,534,535],{},"      Enrichers[\"Enrichers\"]\n",[486,537,539],{"class":488,"line":538},9,[486,540,541],{},"      CustomDrains[\"Custom drains\"]\n",[486,543,545],{"class":488,"line":544},10,[486,546,547],{},"      Catalogs[\"Error \u002F audit\u003Cbr\u002F>catalogs\"]\n",[486,549,551],{"class":488,"line":550},11,[486,552,553],{},"    end\n",[486,555,557],{"class":488,"line":556},12,[486,558,511],{"emptyLinePlaceholder":510},[486,560,562],{"class":488,"line":561},13,[486,563,564],{},"    extend -.->|\"hook into\"| Pipeline\n",[486,566,568],{"class":488,"line":567},14,[486,569,511],{"emptyLinePlaceholder":510},[486,571,573],{"class":488,"line":572},15,[486,574,575],{},"    Pipeline -->|\"events\"| Stream[\"evlog\u002Fstream\u003Cbr\u002F>in-process pub\u002Fsub\"]\n",[486,577,579],{"class":488,"line":578},16,[486,580,581],{},"    Stream --> StreamServer[\"mini HTTP server\u003Cbr\u002F>(SSE bridge)\"]\n",[486,583,585],{"class":488,"line":584},17,[486,586,511],{"emptyLinePlaceholder":510},[486,588,590],{"class":488,"line":589},18,[486,591,592],{},"    subgraph observe [Observe]\n",[486,594,596],{"class":488,"line":595},19,[486,597,523],{},[486,599,601],{"class":488,"line":600},20,[486,602,603],{},"      InProc[\"Sync subscribers\u003Cbr\u002F>(scripts, tests)\"]\n",[486,605,607],{"class":488,"line":606},21,[486,608,609],{},"      Browser[\"Browser tab\u003Cbr\u002F>(devtool)\"]\n",[486,611,613],{"class":488,"line":612},22,[486,614,615],{},"      Cli[\"CLI \u002F curl\"]\n",[486,617,619],{"class":488,"line":618},23,[486,620,621],{},"      FsReader[\"readFsLogs\u003Cbr\u002F>tailFsLogs\"]\n",[486,623,625],{"class":488,"line":624},24,[486,626,553],{},[486,628,630],{"class":488,"line":629},25,[486,631,511],{"emptyLinePlaceholder":510},[486,633,635],{"class":488,"line":634},26,[486,636,637],{},"    Stream -.->|\"in-process\"| InProc\n",[486,639,641],{"class":488,"line":640},27,[486,642,643],{},"    StreamServer --> Browser\n",[486,645,647],{"class":488,"line":646},28,[486,648,649],{},"    StreamServer --> Cli\n",[486,651,653],{"class":488,"line":652},29,[486,654,655],{},"    Drain -->|\"fs adapter\"| FsReader\n",[657,658,660],"h2",{"id":659},"observe-pages-here","Observe — pages here",[662,663,664,679],"table",{},[665,666,667],"thead",{},[668,669,670,673,676],"tr",{},[671,672],"th",{},[671,674,675],{},"What",[671,677,678],{},"When you want it",[680,681,682,703,715,735,754],"tbody",{},[668,683,684,690,700],{},[685,686,687],"td",{},[688,689,298],"a",{"href":299},[685,691,692,695,696,699],{},[483,693,694],{},"createStreamDrain()",", ",[483,697,698],{},"getDefaultStream()"," — in-process subscribe \u002F iterate",[685,701,702],{},"A consumer lives in the same Node process as your app",[668,704,705,709,712],{},[685,706,707],{},[688,708,303],{"href":304},[685,710,711],{},"Mini HTTP server on its own port that exposes the stream over SSE",[685,713,714],{},"A browser tab, a CLI, an external devtool needs to subscribe",[668,716,717,722,732],{},[685,718,719],{},[688,720,721],{"href":309},"Reading FS logs",[685,723,724,727,728,731],{},[483,725,726],{},"readFsLogs()"," \u002F ",[483,729,730],{},"tailFsLogs()"," — replay or follow the NDJSON drain",[685,733,734],{},"You want history (replay yesterday's errors, post-incident triage)",[668,736,737,741,751],{},[685,738,739],{},[688,740,313],{"href":314},[685,742,743,746,747,750],{},[483,744,745],{},"User-Agent: evlog\u002F\u003Cversion>"," + ",[483,748,749],{},"X-Evlog-Source"," on every drain request",[685,752,753],{},"You want receivers (Axiom, Datadog…) to identify evlog traffic",[668,755,756,760,763],{},[685,757,758],{},[688,759,156],{"href":318},[685,761,762],{},"Copy-paste patterns: build a devtool, curl + jq, replay-then-live, aggregate",[685,764,765],{},"You want a starting point",[657,767,769],{"id":768},"extend-where-the-docs-live","Extend — where the docs live",[436,771,772],{},"These surfaces existed before this section — links into their canonical pages:",[662,774,775,786],{},[665,776,777],{},[668,778,779,781,783],{},[671,780],{},[671,782,675],{},[671,784,785],{},"Doc",[680,787,788,806,830,847,864,882,900],{},[668,789,790,795,801],{},[685,791,792],{},[440,793,794],{},"Plugins",[685,796,797,800],{},[483,798,799],{},"definePlugin()"," — opt into any subset of evlog's lifecycle hooks",[685,802,803],{},[688,804,805],{"href":406},"Custom adapter \u002F plugin",[668,807,808,813,822],{},[685,809,810],{},[440,811,812],{},"Custom drains",[685,814,815,727,818,821],{},[483,816,817],{},"defineDrain()",[483,819,820],{},"defineHttpDrain()"," — ship events anywhere",[685,823,824,695,827],{},[688,825,826],{"href":396},"Building blocks: pipeline",[688,828,829],{"href":401},"HTTP drain",[668,831,832,837,843],{},[685,833,834],{},[440,835,836],{},"Custom enrichers",[685,838,839,842],{},[483,840,841],{},"defineEnricher()"," — derive context (geo, deploy id, tenant…)",[685,844,845],{},[688,846,836],{"href":427},[668,848,849,854,860],{},[685,850,851],{},[440,852,853],{},"Error catalogs",[685,855,856,859],{},[483,857,858],{},"defineErrorCatalog()"," — typed error factories with module-augmentation",[685,861,862],{},[688,863,61],{"href":62},[668,865,866,871,877],{},[685,867,868],{},[440,869,870],{},"Audit catalogs",[685,872,873,876],{},[483,874,875],{},"defineAuditCatalog()"," — typed audit actions",[685,878,879],{},[688,880,881],{"href":134},"Audit overview",[668,883,884,889,895],{},[685,885,886],{},[440,887,888],{},"Framework integrations",[685,890,891,894],{},[483,892,893],{},"createMiddlewareLogger()"," + helpers — bring evlog to any HTTP framework",[685,896,897],{},[688,898,899],{"href":286},"Custom integration",[668,901,902,906,909],{},[685,903,904],{},[440,905,322],{},[685,907,908],{},"Publish a catalog as a reusable npm package (Stripe errors, AWS audit…)",[685,910,911],{},[688,912,322],{"href":323},[657,914,916],{"id":915},"a-note-on-serverless","A note on serverless",[436,918,919,920,923,924,927],{},"Both observe-side network features (the ",[688,921,922],{"href":304},"stream server"," for live subscription, the in-process ",[688,925,926],{"href":299},"stream"," primitive) work everywhere a Node-like long-lived process runs — local dev, self-hosted servers, containers (Fly, Railway, Coolify), VMs.",[436,929,930,931,934],{},"They do ",[440,932,933],{},"not"," work on serverless platforms (Vercel Functions, Cloudflare Workers, AWS Lambda) because each invocation is an isolated process. Use a real broker (Redis Streams, NATS, Pub\u002FSub) for cross-instance fan-out in those environments.",[436,936,937,938,940],{},"The fs reader, identity headers, and the entire ",[440,939,468],{}," axis work everywhere — they are not bound to a long-lived process.",[942,943,944],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":481,"searchDepth":495,"depth":495,"links":946},[947,948,949],{"id":659,"depth":495,"text":660},{"id":768,"depth":495,"text":769},{"id":915,"depth":495,"text":916},"Two ways to build on top of evlog — observe the events flowing through the pipeline, or extend the pipeline itself with custom plugins, drains, enrichers, and shareable catalogs.","md",null,{},{"title":41,"icon":54},{"title":431,"description":950},"YT8L9Z6vzSXVLCbBmsGGy6u3HgvwG2gK1KrPpKaxH5I",[958,960],{"title":285,"path":286,"stem":287,"description":959,"icon":288,"children":-1},"Build your own evlog framework integration using the toolkit API — defineFrameworkIntegration, createMiddlewareLogger, AsyncLocalStorage, and the full drain\u002Fenrich\u002Fkeep pipeline.",{"title":298,"path":299,"stem":300,"description":961,"icon":301,"children":-1},"Subscribe to wide events flowing through evlog, in-process, with createStreamDrain — sync listeners, async iterators, and a ring buffer.",1778336619091]