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