[{"data":1,"prerenderedAt":2031},["ShallowReactive",2],{"navigation_docs":3,"-adapters-self-hosted-fs":402,"-adapters-self-hosted-fs-surround":2026},[4,35,159,201,289,299,386],{"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],{"title":295,"path":296,"stem":297,"icon":298},"FS reader","\u002Fbuild-on-top\u002Ffs-reader","5.build-on-top\u002F4.fs-reader","i-lucide-folder-search",{"title":300,"path":301,"stem":302,"children":303,"page":34},"Adapters","\u002Fadapters","6.adapters",[304,307,347,362],{"title":41,"path":305,"stem":306,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":308,"path":309,"stem":310,"children":311,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[312,317,322,327,332,337,342],{"title":313,"path":314,"stem":315,"icon":316},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":318,"path":319,"stem":320,"icon":321},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":323,"path":324,"stem":325,"icon":326},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":328,"path":329,"stem":330,"icon":331},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":333,"path":334,"stem":335,"icon":336},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":338,"path":339,"stem":340,"icon":341},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":343,"path":344,"stem":345,"icon":346},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":348,"path":349,"stem":350,"children":351,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[352,357],{"title":353,"path":354,"stem":355,"icon":356},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":358,"path":359,"stem":360,"icon":361},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":363,"path":364,"stem":365,"children":366,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[367,372,377,381],{"title":368,"path":369,"stem":370,"icon":371},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline","i-lucide-workflow",{"title":373,"path":374,"stem":375,"icon":376},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":378,"path":379,"stem":380,"icon":83},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":382,"path":383,"stem":384,"icon":385},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":387,"path":388,"stem":389,"children":390,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[391,394,398],{"title":41,"path":392,"stem":393,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":395,"path":396,"stem":397,"icon":288},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":399,"path":400,"stem":401,"icon":83},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":403,"title":404,"body":405,"description":2011,"extension":2012,"links":2013,"meta":2022,"navigation":2023,"path":354,"seo":2024,"stem":355,"__hash__":2025},"docs\u002F6.adapters\u002F03.self-hosted\u002F01.fs.md","File System Adapter",{"type":406,"value":407,"toc":1991},"minimark",[408,412,444,490,494,497,540,543,546,1124,1130,1134,1143,1150,1168,1171,1175,1278,1282,1441,1445,1455,1462,1466,1475,1479,1482,1641,1645,1649,1668,1672,1755,1759,1812,1816,1819,1946,1950,1960,1964,1987],[409,410,411],"p",{},"The File System adapter writes your wide events to local NDJSON files (one JSON object per line, one file per day). This enables:",[413,414,415,428,438],"ul",{},[416,417,418,422,423,427],"li",{},[419,420,421],"strong",{},"AI agent integration"," - point a skill to ",[424,425,426],"code",{},".evlog\u002Flogs\u002F"," to parse structured logs for debugging and pattern analysis",[416,429,430,433,434,437],{},[419,431,432],{},"Local dev debugging"," - persistent log history without scrolling the terminal (",[424,435,436],{},"tail -f .evlog\u002Flogs\u002F2026-03-14.jsonl",")",[416,439,440,443],{},[419,441,442],{},"Production backup"," - combine with a network drain (Axiom, OTLP) for local fallback",[445,446,449,452,476],"prompt",{":actions":447,"description":448,"icon":356},"[\"copy\",\"cursor\",\"windsurf\"]","Add the file system drain adapter",[409,450,451],{},"Add the file system drain adapter to write evlog wide events locally as NDJSON files.",[453,454,455,458,461,464,467,470,473],"ol",{},[416,456,457],{},"Identify which framework I'm using and follow its evlog integration pattern",[416,459,460],{},"Install evlog if not already installed",[416,462,463],{},"Import createFsDrain from 'evlog\u002Ffs'",[416,465,466],{},"Wire createFsDrain() into my framework's drain configuration",[416,468,469],{},"Logs are written to .evlog\u002Flogs\u002F by default (one file per day, auto .gitignore)",[416,471,472],{},"Optionally configure dir, maxFiles, maxSizePerFile, or pretty options",[416,474,475],{},"Test by triggering a request and checking .evlog\u002Flogs\u002F*.jsonl",[409,477,478,479,485,486],{},"Adapter docs: ",[480,481,482],"a",{"href":482,"rel":483},"https:\u002F\u002Fwww.evlog.dev\u002Fadapters\u002Fself-hosted\u002Ffs",[484],"nofollow","\nFramework setup: ",[480,487,488],{"href":488,"rel":489},"https:\u002F\u002Fwww.evlog.dev\u002Fframeworks",[484],[491,492,15],"h2",{"id":493},"installation",[409,495,496],{},"The File System adapter comes bundled with evlog:",[498,499,505],"pre",{"className":500,"code":501,"filename":502,"language":503,"meta":504,"style":504},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createFsDrain } from 'evlog\u002Ffs'\n","src\u002Findex.ts","typescript","",[424,506,507],{"__ignoreMap":504},[508,509,512,516,520,524,527,530,533,537],"span",{"class":510,"line":511},"line",1,[508,513,515],{"class":514},"s7zQu","import",[508,517,519],{"class":518},"sMK4o"," {",[508,521,523],{"class":522},"sTEyZ"," createFsDrain",[508,525,526],{"class":518}," }",[508,528,529],{"class":514}," from",[508,531,532],{"class":518}," '",[508,534,536],{"class":535},"sfazB","evlog\u002Ffs",[508,538,539],{"class":518},"'\n",[491,541,20],{"id":542},"quick-start",[409,544,545],{},"No credentials or environment variables needed. Just wire the drain to your framework:",[547,548,549,663,794,856,910,969,1023,1076],"code-group",{},[498,550,553],{"className":500,"code":551,"filename":552,"language":503,"meta":504,"style":504},"\u002F\u002F server\u002Fplugins\u002Fevlog-drain.ts\nimport { createFsDrain } from 'evlog\u002Ffs'\n\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook('evlog:drain', createFsDrain())\n})\n","Nuxt \u002F Nitro",[424,554,555,561,580,587,618,654],{"__ignoreMap":504},[508,556,557],{"class":510,"line":511},[508,558,560],{"class":559},"sHwdD","\u002F\u002F server\u002Fplugins\u002Fevlog-drain.ts\n",[508,562,564,566,568,570,572,574,576,578],{"class":510,"line":563},2,[508,565,515],{"class":514},[508,567,519],{"class":518},[508,569,523],{"class":522},[508,571,526],{"class":518},[508,573,529],{"class":514},[508,575,532],{"class":518},[508,577,536],{"class":535},[508,579,539],{"class":518},[508,581,583],{"class":510,"line":582},3,[508,584,586],{"emptyLinePlaceholder":585},true,"\n",[508,588,590,593,596,600,603,605,609,611,615],{"class":510,"line":589},4,[508,591,592],{"class":514},"export",[508,594,595],{"class":514}," default",[508,597,599],{"class":598},"s2Zo4"," defineNitroPlugin",[508,601,602],{"class":522},"(",[508,604,602],{"class":518},[508,606,608],{"class":607},"sHdIc","nitroApp",[508,610,437],{"class":518},[508,612,614],{"class":613},"spNyl"," =>",[508,616,617],{"class":518}," {\n",[508,619,621,624,627,630,632,635,638,641,644,646,649,651],{"class":510,"line":620},5,[508,622,623],{"class":522},"  nitroApp",[508,625,626],{"class":518},".",[508,628,629],{"class":522},"hooks",[508,631,626],{"class":518},[508,633,634],{"class":598},"hook",[508,636,602],{"class":637},"swJcz",[508,639,640],{"class":518},"'",[508,642,643],{"class":535},"evlog:drain",[508,645,640],{"class":518},[508,647,648],{"class":518},",",[508,650,523],{"class":598},[508,652,653],{"class":637},"())\n",[508,655,657,660],{"class":510,"line":656},6,[508,658,659],{"class":518},"}",[508,661,662],{"class":522},")\n",[498,664,666],{"className":500,"code":665,"filename":216,"language":503,"meta":504,"style":504},"\u002F\u002F lib\u002Fevlog.ts\nimport { createEvlog } from 'evlog\u002Fnext'\nimport { createFsDrain } from 'evlog\u002Ffs'\n\nexport const { withEvlog, useLogger, log, createError } = createEvlog({\n  service: 'my-app',\n  drain: createFsDrain(),\n})\n",[424,667,668,673,693,711,715,754,772,787],{"__ignoreMap":504},[508,669,670],{"class":510,"line":511},[508,671,672],{"class":559},"\u002F\u002F lib\u002Fevlog.ts\n",[508,674,675,677,679,682,684,686,688,691],{"class":510,"line":563},[508,676,515],{"class":514},[508,678,519],{"class":518},[508,680,681],{"class":522}," createEvlog",[508,683,526],{"class":518},[508,685,529],{"class":514},[508,687,532],{"class":518},[508,689,690],{"class":535},"evlog\u002Fnext",[508,692,539],{"class":518},[508,694,695,697,699,701,703,705,707,709],{"class":510,"line":582},[508,696,515],{"class":514},[508,698,519],{"class":518},[508,700,523],{"class":522},[508,702,526],{"class":518},[508,704,529],{"class":514},[508,706,532],{"class":518},[508,708,536],{"class":535},[508,710,539],{"class":518},[508,712,713],{"class":510,"line":589},[508,714,586],{"emptyLinePlaceholder":585},[508,716,717,719,722,724,727,729,732,734,737,739,742,744,747,749,751],{"class":510,"line":620},[508,718,592],{"class":514},[508,720,721],{"class":613}," const",[508,723,519],{"class":518},[508,725,726],{"class":522}," withEvlog",[508,728,648],{"class":518},[508,730,731],{"class":522}," useLogger",[508,733,648],{"class":518},[508,735,736],{"class":522}," log",[508,738,648],{"class":518},[508,740,741],{"class":522}," createError ",[508,743,659],{"class":518},[508,745,746],{"class":518}," =",[508,748,681],{"class":598},[508,750,602],{"class":522},[508,752,753],{"class":518},"{\n",[508,755,756,759,762,764,767,769],{"class":510,"line":656},[508,757,758],{"class":637},"  service",[508,760,761],{"class":518},":",[508,763,532],{"class":518},[508,765,766],{"class":535},"my-app",[508,768,640],{"class":518},[508,770,771],{"class":518},",\n",[508,773,775,778,780,782,785],{"class":510,"line":774},7,[508,776,777],{"class":637},"  drain",[508,779,761],{"class":518},[508,781,523],{"class":598},[508,783,784],{"class":522},"()",[508,786,771],{"class":518},[508,788,790,792],{"class":510,"line":789},8,[508,791,659],{"class":518},[508,793,662],{"class":522},[498,795,797],{"className":500,"code":796,"filename":246,"language":503,"meta":504,"style":504},"import { createFsDrain } from 'evlog\u002Ffs'\n\napp.use(evlog({ drain: createFsDrain() }))\n",[424,798,799,817,821],{"__ignoreMap":504},[508,800,801,803,805,807,809,811,813,815],{"class":510,"line":511},[508,802,515],{"class":514},[508,804,519],{"class":518},[508,806,523],{"class":522},[508,808,526],{"class":518},[508,810,529],{"class":514},[508,812,532],{"class":518},[508,814,536],{"class":535},[508,816,539],{"class":518},[508,818,819],{"class":510,"line":563},[508,820,586],{"emptyLinePlaceholder":585},[508,822,823,826,828,831,833,836,838,841,844,846,848,851,853],{"class":510,"line":582},[508,824,825],{"class":522},"app",[508,827,626],{"class":518},[508,829,830],{"class":598},"use",[508,832,602],{"class":522},[508,834,835],{"class":598},"evlog",[508,837,602],{"class":522},[508,839,840],{"class":518},"{",[508,842,843],{"class":637}," drain",[508,845,761],{"class":518},[508,847,523],{"class":598},[508,849,850],{"class":522},"() ",[508,852,659],{"class":518},[508,854,855],{"class":522},"))\n",[498,857,858],{"className":500,"code":796,"filename":241,"language":503,"meta":504,"style":504},[424,859,860,878,882],{"__ignoreMap":504},[508,861,862,864,866,868,870,872,874,876],{"class":510,"line":511},[508,863,515],{"class":514},[508,865,519],{"class":518},[508,867,523],{"class":522},[508,869,526],{"class":518},[508,871,529],{"class":514},[508,873,532],{"class":518},[508,875,536],{"class":535},[508,877,539],{"class":518},[508,879,880],{"class":510,"line":563},[508,881,586],{"emptyLinePlaceholder":585},[508,883,884,886,888,890,892,894,896,898,900,902,904,906,908],{"class":510,"line":582},[508,885,825],{"class":522},[508,887,626],{"class":518},[508,889,830],{"class":598},[508,891,602],{"class":522},[508,893,835],{"class":598},[508,895,602],{"class":522},[508,897,840],{"class":518},[508,899,843],{"class":637},[508,901,761],{"class":518},[508,903,523],{"class":598},[508,905,850],{"class":522},[508,907,659],{"class":518},[508,909,855],{"class":522},[498,911,913],{"className":500,"code":912,"filename":251,"language":503,"meta":504,"style":504},"import { createFsDrain } from 'evlog\u002Ffs'\n\nawait app.register(evlog, { drain: createFsDrain() })\n",[424,914,915,933,937],{"__ignoreMap":504},[508,916,917,919,921,923,925,927,929,931],{"class":510,"line":511},[508,918,515],{"class":514},[508,920,519],{"class":518},[508,922,523],{"class":522},[508,924,526],{"class":518},[508,926,529],{"class":514},[508,928,532],{"class":518},[508,930,536],{"class":535},[508,932,539],{"class":518},[508,934,935],{"class":510,"line":563},[508,936,586],{"emptyLinePlaceholder":585},[508,938,939,942,945,947,950,953,955,957,959,961,963,965,967],{"class":510,"line":582},[508,940,941],{"class":514},"await",[508,943,944],{"class":522}," app",[508,946,626],{"class":518},[508,948,949],{"class":598},"register",[508,951,952],{"class":522},"(evlog",[508,954,648],{"class":518},[508,956,519],{"class":518},[508,958,843],{"class":637},[508,960,761],{"class":518},[508,962,523],{"class":598},[508,964,850],{"class":522},[508,966,659],{"class":518},[508,968,662],{"class":522},[498,970,971],{"className":500,"code":796,"filename":256,"language":503,"meta":504,"style":504},[424,972,973,991,995],{"__ignoreMap":504},[508,974,975,977,979,981,983,985,987,989],{"class":510,"line":511},[508,976,515],{"class":514},[508,978,519],{"class":518},[508,980,523],{"class":522},[508,982,526],{"class":518},[508,984,529],{"class":514},[508,986,532],{"class":518},[508,988,536],{"class":535},[508,990,539],{"class":518},[508,992,993],{"class":510,"line":563},[508,994,586],{"emptyLinePlaceholder":585},[508,996,997,999,1001,1003,1005,1007,1009,1011,1013,1015,1017,1019,1021],{"class":510,"line":582},[508,998,825],{"class":522},[508,1000,626],{"class":518},[508,1002,830],{"class":598},[508,1004,602],{"class":522},[508,1006,835],{"class":598},[508,1008,602],{"class":522},[508,1010,840],{"class":518},[508,1012,843],{"class":637},[508,1014,761],{"class":518},[508,1016,523],{"class":598},[508,1018,850],{"class":522},[508,1020,659],{"class":518},[508,1022,855],{"class":522},[498,1024,1026],{"className":500,"code":1025,"filename":236,"language":503,"meta":504,"style":504},"import { createFsDrain } from 'evlog\u002Ffs'\n\nEvlogModule.forRoot({ drain: createFsDrain() })\n",[424,1027,1028,1046,1050],{"__ignoreMap":504},[508,1029,1030,1032,1034,1036,1038,1040,1042,1044],{"class":510,"line":511},[508,1031,515],{"class":514},[508,1033,519],{"class":518},[508,1035,523],{"class":522},[508,1037,526],{"class":518},[508,1039,529],{"class":514},[508,1041,532],{"class":518},[508,1043,536],{"class":535},[508,1045,539],{"class":518},[508,1047,1048],{"class":510,"line":563},[508,1049,586],{"emptyLinePlaceholder":585},[508,1051,1052,1055,1057,1060,1062,1064,1066,1068,1070,1072,1074],{"class":510,"line":582},[508,1053,1054],{"class":522},"EvlogModule",[508,1056,626],{"class":518},[508,1058,1059],{"class":598},"forRoot",[508,1061,602],{"class":522},[508,1063,840],{"class":518},[508,1065,843],{"class":637},[508,1067,761],{"class":518},[508,1069,523],{"class":598},[508,1071,850],{"class":522},[508,1073,659],{"class":518},[508,1075,662],{"class":522},[498,1077,1079],{"className":500,"code":1078,"filename":271,"language":503,"meta":504,"style":504},"import { createFsDrain } from 'evlog\u002Ffs'\n\ninitLogger({ drain: createFsDrain() })\n",[424,1080,1081,1099,1103],{"__ignoreMap":504},[508,1082,1083,1085,1087,1089,1091,1093,1095,1097],{"class":510,"line":511},[508,1084,515],{"class":514},[508,1086,519],{"class":518},[508,1088,523],{"class":522},[508,1090,526],{"class":518},[508,1092,529],{"class":514},[508,1094,532],{"class":518},[508,1096,536],{"class":535},[508,1098,539],{"class":518},[508,1100,1101],{"class":510,"line":563},[508,1102,586],{"emptyLinePlaceholder":585},[508,1104,1105,1108,1110,1112,1114,1116,1118,1120,1122],{"class":510,"line":582},[508,1106,1107],{"class":598},"initLogger",[508,1109,602],{"class":522},[508,1111,840],{"class":518},[508,1113,843],{"class":637},[508,1115,761],{"class":518},[508,1117,523],{"class":598},[508,1119,850],{"class":522},[508,1121,659],{"class":518},[508,1123,662],{"class":522},[409,1125,1126,1127,1129],{},"Logs start appearing in ",[424,1128,426],{}," immediately.",[491,1131,1133],{"id":1132},"file-structure","File Structure",[498,1135,1141],{"className":1136,"code":1138,"filename":1139,"language":1140,"meta":504},[1137],"language-text",".evlog\u002F\n  logs\u002F\n    2026-03-14.jsonl    ← one file per day\n    2026-03-13.jsonl\n    2026-03-12.jsonl\n",".evlog\u002Flogs directory layout","text",[424,1142,1138],{"__ignoreMap":504},[409,1144,1145,1146,1149],{},"Each ",[424,1147,1148],{},".jsonl"," file contains one JSON object per line (NDJSON format), making it easy to parse, grep, and stream.",[1151,1152,1155,1156,1159,1160,1163,1164,1167],"callout",{"color":1153,"icon":1154},"success","i-lucide-git-branch","A ",[424,1157,1158],{},".gitignore"," is automatically created on first write, inside the ",[424,1161,1162],{},".evlog\u002F"," ancestor directory when present or in the configured ",[424,1165,1166],{},"dir"," otherwise. Log files are never committed to version control.",[491,1169,170],{"id":1170},"configuration",[1172,1173,85],"h3",{"id":1174},"options",[1176,1177,1178,1197],"table",{},[1179,1180,1181],"thead",{},[1182,1183,1184,1188,1191,1194],"tr",{},[1185,1186,1187],"th",{},"Option",[1185,1189,1190],{},"Type",[1185,1192,1193],{},"Default",[1185,1195,1196],{},"Description",[1198,1199,1200,1220,1240,1258],"tbody",{},[1182,1201,1202,1207,1212,1217],{},[1203,1204,1205],"td",{},[424,1206,1166],{},[1203,1208,1209],{},[424,1210,1211],{},"string",[1203,1213,1214],{},[424,1215,1216],{},"'.evlog\u002Flogs'",[1203,1218,1219],{},"Directory for log files",[1182,1221,1222,1227,1232,1237],{},[1203,1223,1224],{},[424,1225,1226],{},"maxFiles",[1203,1228,1229],{},[424,1230,1231],{},"number",[1203,1233,1234],{},[424,1235,1236],{},"undefined",[1203,1238,1239],{},"Max files to keep (auto-deletes oldest)",[1182,1241,1242,1247,1251,1255],{},[1203,1243,1244],{},[424,1245,1246],{},"maxSizePerFile",[1203,1248,1249],{},[424,1250,1231],{},[1203,1252,1253],{},[424,1254,1236],{},[1203,1256,1257],{},"Max bytes per file before rotating",[1182,1259,1260,1265,1270,1275],{},[1203,1261,1262],{},[424,1263,1264],{},"pretty",[1203,1266,1267],{},[424,1268,1269],{},"boolean",[1203,1271,1272],{},[424,1273,1274],{},"false",[1203,1276,1277],{},"Pretty-print JSON (multi-line, readable)",[1172,1279,1281],{"id":1280},"examples","Examples",[498,1283,1286],{"className":500,"code":1284,"filename":1285,"language":503,"meta":504,"style":504},"\u002F\u002F Keep only the last 7 days of logs\ncreateFsDrain({ maxFiles: 7 })\n\n\u002F\u002F Rotate files at 10MB, keep 30 files\ncreateFsDrain({\n  maxSizePerFile: 10 * 1024 * 1024,\n  maxFiles: 30,\n})\n\n\u002F\u002F Pretty-print for human reading\ncreateFsDrain({ pretty: true })\n\n\u002F\u002F Custom directory\ncreateFsDrain({ dir: '\u002Fvar\u002Flog\u002Fmyapp' })\n","server\u002Fplugins\u002Fevlog-drain.ts",[424,1287,1288,1293,1315,1319,1324,1332,1354,1366,1372,1377,1383,1405,1410,1416],{"__ignoreMap":504},[508,1289,1290],{"class":510,"line":511},[508,1291,1292],{"class":559},"\u002F\u002F Keep only the last 7 days of logs\n",[508,1294,1295,1298,1300,1302,1305,1307,1311,1313],{"class":510,"line":563},[508,1296,1297],{"class":598},"createFsDrain",[508,1299,602],{"class":522},[508,1301,840],{"class":518},[508,1303,1304],{"class":637}," maxFiles",[508,1306,761],{"class":518},[508,1308,1310],{"class":1309},"sbssI"," 7",[508,1312,526],{"class":518},[508,1314,662],{"class":522},[508,1316,1317],{"class":510,"line":582},[508,1318,586],{"emptyLinePlaceholder":585},[508,1320,1321],{"class":510,"line":589},[508,1322,1323],{"class":559},"\u002F\u002F Rotate files at 10MB, keep 30 files\n",[508,1325,1326,1328,1330],{"class":510,"line":620},[508,1327,1297],{"class":598},[508,1329,602],{"class":522},[508,1331,753],{"class":518},[508,1333,1334,1337,1339,1342,1345,1348,1350,1352],{"class":510,"line":656},[508,1335,1336],{"class":637},"  maxSizePerFile",[508,1338,761],{"class":518},[508,1340,1341],{"class":1309}," 10",[508,1343,1344],{"class":518}," *",[508,1346,1347],{"class":1309}," 1024",[508,1349,1344],{"class":518},[508,1351,1347],{"class":1309},[508,1353,771],{"class":518},[508,1355,1356,1359,1361,1364],{"class":510,"line":774},[508,1357,1358],{"class":637},"  maxFiles",[508,1360,761],{"class":518},[508,1362,1363],{"class":1309}," 30",[508,1365,771],{"class":518},[508,1367,1368,1370],{"class":510,"line":789},[508,1369,659],{"class":518},[508,1371,662],{"class":522},[508,1373,1375],{"class":510,"line":1374},9,[508,1376,586],{"emptyLinePlaceholder":585},[508,1378,1380],{"class":510,"line":1379},10,[508,1381,1382],{"class":559},"\u002F\u002F Pretty-print for human reading\n",[508,1384,1386,1388,1390,1392,1395,1397,1401,1403],{"class":510,"line":1385},11,[508,1387,1297],{"class":598},[508,1389,602],{"class":522},[508,1391,840],{"class":518},[508,1393,1394],{"class":637}," pretty",[508,1396,761],{"class":518},[508,1398,1400],{"class":1399},"sfNiH"," true",[508,1402,526],{"class":518},[508,1404,662],{"class":522},[508,1406,1408],{"class":510,"line":1407},12,[508,1409,586],{"emptyLinePlaceholder":585},[508,1411,1413],{"class":510,"line":1412},13,[508,1414,1415],{"class":559},"\u002F\u002F Custom directory\n",[508,1417,1419,1421,1423,1425,1428,1430,1432,1435,1437,1439],{"class":510,"line":1418},14,[508,1420,1297],{"class":598},[508,1422,602],{"class":522},[508,1424,840],{"class":518},[508,1426,1427],{"class":637}," dir",[508,1429,761],{"class":518},[508,1431,532],{"class":518},[508,1433,1434],{"class":535},"\u002Fvar\u002Flog\u002Fmyapp",[508,1436,640],{"class":518},[508,1438,526],{"class":518},[508,1440,662],{"class":522},[1172,1442,1444],{"id":1443},"file-rotation","File Rotation",[409,1446,1447,1448,1451,1452,1454],{},"By default, a new file is created each day (",[424,1449,1450],{},"2026-03-14.jsonl","). When ",[424,1453,1246],{}," is set, the adapter creates suffixed files when the current file exceeds the limit:",[498,1456,1460],{"className":1457,"code":1458,"filename":1459,"language":1140,"meta":504},[1137],".evlog\u002Flogs\u002F\n  2026-03-14.jsonl      ← base file (full)\n  2026-03-14.1.jsonl    ← first rotation\n  2026-03-14.2.jsonl    ← second rotation\n","Rotated log files",[424,1461,1458],{"__ignoreMap":504},[1172,1463,1465],{"id":1464},"cleanup","Cleanup",[409,1467,1468,1469,1471,1472,1474],{},"When ",[424,1470,1226],{}," is set, the adapter automatically deletes the oldest ",[424,1473,1148],{}," files after each write, keeping only the most recent files.",[491,1476,1478],{"id":1477},"combining-with-network-drains","Combining with Network Drains",[409,1480,1481],{},"Use the FS adapter alongside a network drain for local backup:",[498,1483,1485],{"className":500,"code":1484,"filename":1285,"language":503,"meta":504,"style":504},"import { createFsDrain } from 'evlog\u002Ffs'\nimport { createAxiomDrain } from 'evlog\u002Faxiom'\n\nconst fs = createFsDrain({ maxFiles: 7 })\nconst axiom = createAxiomDrain()\n\nconst drain = async (ctx) => {\n  await Promise.allSettled([fs(ctx), axiom(ctx)])\n}\n",[424,1486,1487,1505,1525,1529,1556,1570,1574,1598,1636],{"__ignoreMap":504},[508,1488,1489,1491,1493,1495,1497,1499,1501,1503],{"class":510,"line":511},[508,1490,515],{"class":514},[508,1492,519],{"class":518},[508,1494,523],{"class":522},[508,1496,526],{"class":518},[508,1498,529],{"class":514},[508,1500,532],{"class":518},[508,1502,536],{"class":535},[508,1504,539],{"class":518},[508,1506,1507,1509,1511,1514,1516,1518,1520,1523],{"class":510,"line":563},[508,1508,515],{"class":514},[508,1510,519],{"class":518},[508,1512,1513],{"class":522}," createAxiomDrain",[508,1515,526],{"class":518},[508,1517,529],{"class":514},[508,1519,532],{"class":518},[508,1521,1522],{"class":535},"evlog\u002Faxiom",[508,1524,539],{"class":518},[508,1526,1527],{"class":510,"line":582},[508,1528,586],{"emptyLinePlaceholder":585},[508,1530,1531,1534,1537,1540,1542,1544,1546,1548,1550,1552,1554],{"class":510,"line":589},[508,1532,1533],{"class":613},"const",[508,1535,1536],{"class":522}," fs ",[508,1538,1539],{"class":518},"=",[508,1541,523],{"class":598},[508,1543,602],{"class":522},[508,1545,840],{"class":518},[508,1547,1304],{"class":637},[508,1549,761],{"class":518},[508,1551,1310],{"class":1309},[508,1553,526],{"class":518},[508,1555,662],{"class":522},[508,1557,1558,1560,1563,1565,1567],{"class":510,"line":620},[508,1559,1533],{"class":613},[508,1561,1562],{"class":522}," axiom ",[508,1564,1539],{"class":518},[508,1566,1513],{"class":598},[508,1568,1569],{"class":522},"()\n",[508,1571,1572],{"class":510,"line":656},[508,1573,586],{"emptyLinePlaceholder":585},[508,1575,1576,1578,1581,1583,1586,1589,1592,1594,1596],{"class":510,"line":774},[508,1577,1533],{"class":613},[508,1579,1580],{"class":522}," drain ",[508,1582,1539],{"class":518},[508,1584,1585],{"class":613}," async",[508,1587,1588],{"class":518}," (",[508,1590,1591],{"class":607},"ctx",[508,1593,437],{"class":518},[508,1595,614],{"class":613},[508,1597,617],{"class":518},[508,1599,1600,1603,1607,1609,1612,1615,1618,1620,1622,1624,1626,1629,1631,1633],{"class":510,"line":789},[508,1601,1602],{"class":514},"  await",[508,1604,1606],{"class":1605},"sBMFI"," Promise",[508,1608,626],{"class":518},[508,1610,1611],{"class":598},"allSettled",[508,1613,1614],{"class":637},"([",[508,1616,1617],{"class":598},"fs",[508,1619,602],{"class":637},[508,1621,1591],{"class":522},[508,1623,437],{"class":637},[508,1625,648],{"class":518},[508,1627,1628],{"class":598}," axiom",[508,1630,602],{"class":637},[508,1632,1591],{"class":522},[508,1634,1635],{"class":637},")])\n",[508,1637,1638],{"class":510,"line":1374},[508,1639,1640],{"class":518},"}\n",[491,1642,1644],{"id":1643},"querying-logs","Querying Logs",[1172,1646,1648],{"id":1647},"stream-in-real-time","Stream in real-time",[498,1650,1655],{"className":1651,"code":1652,"filename":1653,"language":1654,"meta":504,"style":504},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","tail -f .evlog\u002Flogs\u002F2026-03-14.jsonl\n","Terminal","bash",[424,1656,1657],{"__ignoreMap":504},[508,1658,1659,1662,1665],{"class":510,"line":511},[508,1660,1661],{"class":1605},"tail",[508,1663,1664],{"class":535}," -f",[508,1666,1667],{"class":535}," .evlog\u002Flogs\u002F2026-03-14.jsonl\n",[1172,1669,1671],{"id":1670},"search-with-jq","Search with jq",[498,1673,1675],{"className":1651,"code":1674,"filename":1653,"language":1654,"meta":504,"style":504},"# Find errors\ncat .evlog\u002Flogs\u002F2026-03-14.jsonl | jq 'select(.level == \"error\")'\n\n# Slow requests (duration is a formatted string like \"706ms\" or \"1.23s\")\ncat .evlog\u002Flogs\u002F2026-03-14.jsonl | jq 'select(.duration | test(\"^[0-9.]+s\"))'\n\n# Requests by path\ncat .evlog\u002Flogs\u002F2026-03-14.jsonl | jq 'select(.path == \"\u002Fapi\u002Fcheckout\")'\n",[424,1676,1677,1682,1703,1707,1712,1729,1733,1738],{"__ignoreMap":504},[508,1678,1679],{"class":510,"line":511},[508,1680,1681],{"class":559},"# Find errors\n",[508,1683,1684,1687,1690,1693,1696,1698,1701],{"class":510,"line":563},[508,1685,1686],{"class":1605},"cat",[508,1688,1689],{"class":535}," .evlog\u002Flogs\u002F2026-03-14.jsonl",[508,1691,1692],{"class":518}," |",[508,1694,1695],{"class":1605}," jq",[508,1697,532],{"class":518},[508,1699,1700],{"class":535},"select(.level == \"error\")",[508,1702,539],{"class":518},[508,1704,1705],{"class":510,"line":582},[508,1706,586],{"emptyLinePlaceholder":585},[508,1708,1709],{"class":510,"line":589},[508,1710,1711],{"class":559},"# Slow requests (duration is a formatted string like \"706ms\" or \"1.23s\")\n",[508,1713,1714,1716,1718,1720,1722,1724,1727],{"class":510,"line":620},[508,1715,1686],{"class":1605},[508,1717,1689],{"class":535},[508,1719,1692],{"class":518},[508,1721,1695],{"class":1605},[508,1723,532],{"class":518},[508,1725,1726],{"class":535},"select(.duration | test(\"^[0-9.]+s\"))",[508,1728,539],{"class":518},[508,1730,1731],{"class":510,"line":656},[508,1732,586],{"emptyLinePlaceholder":585},[508,1734,1735],{"class":510,"line":774},[508,1736,1737],{"class":559},"# Requests by path\n",[508,1739,1740,1742,1744,1746,1748,1750,1753],{"class":510,"line":789},[508,1741,1686],{"class":1605},[508,1743,1689],{"class":535},[508,1745,1692],{"class":518},[508,1747,1695],{"class":1605},[508,1749,532],{"class":518},[508,1751,1752],{"class":535},"select(.path == \"\u002Fapi\u002Fcheckout\")",[508,1754,539],{"class":518},[1172,1756,1758],{"id":1757},"search-with-grep","Search with grep",[498,1760,1762],{"className":1651,"code":1761,"filename":1653,"language":1654,"meta":504,"style":504},"# Find all errors\ngrep '\"level\":\"error\"' .evlog\u002Flogs\u002F2026-03-14.jsonl\n\n# Find by request ID\ngrep 'req_abc123' .evlog\u002Flogs\u002F*.jsonl\n",[424,1763,1764,1769,1783,1787,1792],{"__ignoreMap":504},[508,1765,1766],{"class":510,"line":511},[508,1767,1768],{"class":559},"# Find all errors\n",[508,1770,1771,1774,1776,1779,1781],{"class":510,"line":563},[508,1772,1773],{"class":1605},"grep",[508,1775,532],{"class":518},[508,1777,1778],{"class":535},"\"level\":\"error\"",[508,1780,640],{"class":518},[508,1782,1667],{"class":535},[508,1784,1785],{"class":510,"line":582},[508,1786,586],{"emptyLinePlaceholder":585},[508,1788,1789],{"class":510,"line":589},[508,1790,1791],{"class":559},"# Find by request ID\n",[508,1793,1794,1796,1798,1801,1803,1806,1809],{"class":510,"line":620},[508,1795,1773],{"class":1605},[508,1797,532],{"class":518},[508,1799,1800],{"class":535},"req_abc123",[508,1802,640],{"class":518},[508,1804,1805],{"class":535}," .evlog\u002Flogs\u002F",[508,1807,1808],{"class":522},"*",[508,1810,1811],{"class":535},".jsonl\n",[491,1813,1815],{"id":1814},"direct-api-usage","Direct API Usage",[409,1817,1818],{},"For advanced use cases, use the lower-level write functions:",[498,1820,1822],{"className":500,"code":1821,"filename":502,"language":503,"meta":504,"style":504},"import { writeToFs, writeBatchToFs } from 'evlog\u002Ffs'\n\nawait writeToFs(event, {\n  dir: '.evlog\u002Flogs',\n  pretty: false,\n})\n\nawait writeBatchToFs(events, {\n  dir: '.evlog\u002Flogs',\n  pretty: false,\n})\n",[424,1823,1824,1848,1852,1865,1881,1893,1899,1903,1916,1930,1940],{"__ignoreMap":504},[508,1825,1826,1828,1830,1833,1835,1838,1840,1842,1844,1846],{"class":510,"line":511},[508,1827,515],{"class":514},[508,1829,519],{"class":518},[508,1831,1832],{"class":522}," writeToFs",[508,1834,648],{"class":518},[508,1836,1837],{"class":522}," writeBatchToFs",[508,1839,526],{"class":518},[508,1841,529],{"class":514},[508,1843,532],{"class":518},[508,1845,536],{"class":535},[508,1847,539],{"class":518},[508,1849,1850],{"class":510,"line":563},[508,1851,586],{"emptyLinePlaceholder":585},[508,1853,1854,1856,1858,1861,1863],{"class":510,"line":582},[508,1855,941],{"class":514},[508,1857,1832],{"class":598},[508,1859,1860],{"class":522},"(event",[508,1862,648],{"class":518},[508,1864,617],{"class":518},[508,1866,1867,1870,1872,1874,1877,1879],{"class":510,"line":589},[508,1868,1869],{"class":637},"  dir",[508,1871,761],{"class":518},[508,1873,532],{"class":518},[508,1875,1876],{"class":535},".evlog\u002Flogs",[508,1878,640],{"class":518},[508,1880,771],{"class":518},[508,1882,1883,1886,1888,1891],{"class":510,"line":620},[508,1884,1885],{"class":637},"  pretty",[508,1887,761],{"class":518},[508,1889,1890],{"class":1399}," false",[508,1892,771],{"class":518},[508,1894,1895,1897],{"class":510,"line":656},[508,1896,659],{"class":518},[508,1898,662],{"class":522},[508,1900,1901],{"class":510,"line":774},[508,1902,586],{"emptyLinePlaceholder":585},[508,1904,1905,1907,1909,1912,1914],{"class":510,"line":789},[508,1906,941],{"class":514},[508,1908,1837],{"class":598},[508,1910,1911],{"class":522},"(events",[508,1913,648],{"class":518},[508,1915,617],{"class":518},[508,1917,1918,1920,1922,1924,1926,1928],{"class":510,"line":1374},[508,1919,1869],{"class":637},[508,1921,761],{"class":518},[508,1923,532],{"class":518},[508,1925,1876],{"class":535},[508,1927,640],{"class":518},[508,1929,771],{"class":518},[508,1931,1932,1934,1936,1938],{"class":510,"line":1379},[508,1933,1885],{"class":637},[508,1935,761],{"class":518},[508,1937,1890],{"class":1399},[508,1939,771],{"class":518},[508,1941,1942,1944],{"class":510,"line":1385},[508,1943,659],{"class":518},[508,1945,662],{"class":522},[491,1947,1949],{"id":1948},"ai-log-analysis","AI Log Analysis",[409,1951,1952,1953,1959],{},"The file system drain pairs with the ",[480,1954,1955,1958],{"href":26},[424,1956,1957],{},"analyze-logs"," agent skill",". When installed, your AI assistant can read the NDJSON logs directly to debug errors, trace requests, and investigate performance without any external tools.",[491,1961,1963],{"id":1962},"next-steps","Next Steps",[413,1965,1966,1971,1977,1982],{},[416,1967,1968,1970],{},[480,1969,25],{"href":26}," - Let AI analyze your logs",[416,1972,1973,1976],{},[480,1974,1975],{"href":314},"Axiom Adapter"," - Send logs to Axiom for querying and dashboards",[416,1978,1979,1981],{},[480,1980,368],{"href":369}," - Add batching and retry to any drain",[416,1983,1984,1986],{},[480,1985,378],{"href":379}," - Build your own adapter",[1988,1989,1990],"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 .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 .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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}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 .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":504,"searchDepth":563,"depth":563,"links":1992},[1993,1994,1995,1996,2002,2003,2008,2009,2010],{"id":493,"depth":563,"text":15},{"id":542,"depth":563,"text":20},{"id":1132,"depth":563,"text":1133},{"id":1170,"depth":563,"text":170,"children":1997},[1998,1999,2000,2001],{"id":1174,"depth":582,"text":85},{"id":1280,"depth":582,"text":1281},{"id":1443,"depth":582,"text":1444},{"id":1464,"depth":582,"text":1465},{"id":1477,"depth":563,"text":1478},{"id":1643,"depth":563,"text":1644,"children":2004},[2005,2006,2007],{"id":1647,"depth":582,"text":1648},{"id":1670,"depth":582,"text":1671},{"id":1757,"depth":582,"text":1758},{"id":1814,"depth":563,"text":1815},{"id":1948,"depth":563,"text":1949},{"id":1962,"depth":563,"text":1963},"Write wide events to the local file system as NDJSON for local debugging, AI agent integration, and production backup.","md",[2014,2021],{"label":2015,"icon":2016,"to":2017,"target":2018,"color":2019,"variant":2020},"NDJSON Format","i-lucide-external-link","https:\u002F\u002Fgithub.com\u002Fndjson\u002Fndjson-spec","_blank","neutral","subtle",{"label":1975,"icon":316,"to":314,"color":2019,"variant":2020},{},{"title":353,"icon":356},{"title":404,"description":2011},"T-NSInoBfsszInuemgpjhveYPzh_-TPNDElWBkmM_fo",[2027,2029],{"title":343,"path":344,"stem":345,"description":2028,"icon":346,"children":-1},"Send wide events to HyperDX via OTLP\u002FHTTP using HyperDX’s documented OpenTelemetry endpoint and authorization header. Zero-config setup with environment variables.",{"title":358,"path":359,"stem":360,"description":2030,"icon":361,"children":-1},"Self-hosted log retention for evlog using NuxtHub database storage. Store, query, and automatically clean up your structured logs with zero external dependencies.",1778325972052]