[{"data":1,"prerenderedAt":1741},["ShallowReactive",2],{"navigation_docs":3,"-logging-audit-recipes":388,"-logging-audit-recipes-surround":1736},[4,35,155,197,285,372],{"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,94,122],{"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},"Client Logging","\u002Flogging\u002Fclient-logging","2.logging\u002F4.client-logging","i-lucide-monitor",{"title":66,"icon":67,"path":68,"stem":69,"children":70,"page":34},"AI SDK","i-simple-icons-vercel","\u002Flogging\u002Fai-sdk","2.logging\u002F5.ai-sdk",[71,74,79,84,89],{"title":41,"path":72,"stem":73,"icon":44},"\u002Flogging\u002Fai-sdk\u002Foverview","2.logging\u002F5.ai-sdk\u002F01.overview",{"title":75,"path":76,"stem":77,"icon":78},"Usage","\u002Flogging\u002Fai-sdk\u002Fusage","2.logging\u002F5.ai-sdk\u002F02.usage","i-lucide-code",{"title":80,"path":81,"stem":82,"icon":83},"Options","\u002Flogging\u002Fai-sdk\u002Foptions","2.logging\u002F5.ai-sdk\u002F03.options","i-lucide-sliders",{"title":85,"path":86,"stem":87,"icon":88},"Metadata","\u002Flogging\u002Fai-sdk\u002Fmetadata","2.logging\u002F5.ai-sdk\u002F04.metadata","i-lucide-database",{"title":90,"path":91,"stem":92,"icon":93},"Telemetry","\u002Flogging\u002Fai-sdk\u002Ftelemetry","2.logging\u002F5.ai-sdk\u002F05.telemetry","i-lucide-activity",{"title":95,"icon":96,"path":97,"stem":98,"children":99,"page":34},"Better Auth","i-simple-icons-betterauth","\u002Flogging\u002Fbetter-auth","2.logging\u002F6.better-auth",[100,103,108,113,117],{"title":41,"path":101,"stem":102,"icon":44},"\u002Flogging\u002Fbetter-auth\u002Foverview","2.logging\u002F6.better-auth\u002F01.overview",{"title":104,"path":105,"stem":106,"icon":107},"Identify User","\u002Flogging\u002Fbetter-auth\u002Fidentify-user","2.logging\u002F6.better-auth\u002F02.identify-user","i-lucide-user-check",{"title":109,"path":110,"stem":111,"icon":112},"Middleware","\u002Flogging\u002Fbetter-auth\u002Fmiddleware","2.logging\u002F6.better-auth\u002F03.middleware","i-lucide-shield",{"title":114,"path":115,"stem":116,"icon":64},"Client Sync","\u002Flogging\u002Fbetter-auth\u002Fclient-sync","2.logging\u002F6.better-auth\u002F04.client-sync",{"title":118,"path":119,"stem":120,"icon":121},"Performance","\u002Flogging\u002Fbetter-auth\u002Fperformance","2.logging\u002F6.better-auth\u002F05.performance","i-lucide-gauge",{"title":123,"icon":124,"path":125,"stem":126,"children":127,"page":34},"Audit Logs","i-lucide-shield-check","\u002Flogging\u002Faudit","2.logging\u002F7.audit",[128,131,136,141,146,150],{"title":41,"path":129,"stem":130,"icon":44},"\u002Flogging\u002Faudit\u002Foverview","2.logging\u002F7.audit\u002F01.overview",{"title":132,"path":133,"stem":134,"icon":135},"Schema","\u002Flogging\u002Faudit\u002Fschema","2.logging\u002F7.audit\u002F02.schema","i-lucide-file-text",{"title":137,"path":138,"stem":139,"icon":140},"Recording","\u002Flogging\u002Faudit\u002Frecording","2.logging\u002F7.audit\u002F03.recording","i-lucide-pen-line",{"title":142,"path":143,"stem":144,"icon":145},"Drains","\u002Flogging\u002Faudit\u002Fpipeline","2.logging\u002F7.audit\u002F04.pipeline","i-lucide-link",{"title":147,"path":148,"stem":149,"icon":124},"Compliance","\u002Flogging\u002Faudit\u002Fcompliance","2.logging\u002F7.audit\u002F05.compliance",{"title":151,"path":152,"stem":153,"icon":154},"Recipes","\u002Flogging\u002Faudit\u002Frecipes","2.logging\u002F7.audit\u002F06.recipes","i-lucide-book-open",{"title":156,"path":157,"stem":158,"children":159,"page":34},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[160,165,170,175,180,184,187,192],{"title":161,"path":162,"stem":163,"icon":164},"Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":166,"path":167,"stem":168,"icon":169},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F1.configuration","i-lucide-settings",{"title":171,"path":172,"stem":173,"icon":174},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F2.sampling","i-lucide-filter",{"title":176,"path":177,"stem":178,"icon":179},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F3.typed-fields","i-simple-icons-typescript",{"title":181,"path":182,"stem":183,"icon":124},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F4.best-practices",{"title":118,"path":185,"stem":186,"icon":121},"\u002Fcore-concepts\u002Fperformance","3.core-concepts\u002F5.performance",{"title":188,"path":189,"stem":190,"icon":191},"Vite Plugin","\u002Fcore-concepts\u002Fvite-plugin","3.core-concepts\u002F6.vite-plugin","i-custom-vite",{"title":193,"path":194,"stem":195,"icon":196},"Auto-Redaction","\u002Fcore-concepts\u002Fredaction","3.core-concepts\u002F7.redaction","i-lucide-eye-off",{"title":198,"path":199,"stem":200,"children":201,"page":34},"Frameworks","\u002Fframeworks","4.frameworks",[202,206,211,216,221,226,231,236,241,246,251,256,261,266,270,275,280],{"title":41,"path":203,"stem":204,"icon":205},"\u002Fframeworks\u002Foverview","4.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":207,"path":208,"stem":209,"icon":210},"Nuxt","\u002Fframeworks\u002Fnuxt","4.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":212,"path":213,"stem":214,"icon":215},"Next.js","\u002Fframeworks\u002Fnextjs","4.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":217,"path":218,"stem":219,"icon":220},"SvelteKit","\u002Fframeworks\u002Fsveltekit","4.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":222,"path":223,"stem":224,"icon":225},"Nitro","\u002Fframeworks\u002Fnitro","4.frameworks\u002F04.nitro","i-custom-nitro",{"title":227,"path":228,"stem":229,"icon":230},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","4.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":232,"path":233,"stem":234,"icon":235},"NestJS","\u002Fframeworks\u002Fnestjs","4.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":237,"path":238,"stem":239,"icon":240},"Express","\u002Fframeworks\u002Fexpress","4.frameworks\u002F07.express","i-simple-icons-express",{"title":242,"path":243,"stem":244,"icon":245},"Hono","\u002Fframeworks\u002Fhono","4.frameworks\u002F08.hono","i-simple-icons-hono",{"title":247,"path":248,"stem":249,"icon":250},"Fastify","\u002Fframeworks\u002Ffastify","4.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":252,"path":253,"stem":254,"icon":255},"Elysia","\u002Fframeworks\u002Felysia","4.frameworks\u002F10.elysia","i-custom-elysia",{"title":257,"path":258,"stem":259,"icon":260},"React Router","\u002Fframeworks\u002Freact-router","4.frameworks\u002F11.react-router","i-custom-reactrouter",{"title":262,"path":263,"stem":264,"icon":265},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","4.frameworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":267,"path":268,"stem":269,"icon":179},"Standalone","\u002Fframeworks\u002Fstandalone","4.frameworks\u002F13.standalone",{"title":271,"path":272,"stem":273,"icon":274},"Astro","\u002Fframeworks\u002Fastro","4.frameworks\u002F14.astro","i-simple-icons-astro",{"title":276,"path":277,"stem":278,"icon":279},"AWS Lambda","\u002Fframeworks\u002Faws-lambda","4.frameworks\u002F16.aws-lambda","i-custom-lambda",{"title":281,"path":282,"stem":283,"icon":284},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","4.frameworks\u002F17.custom-integration","i-lucide-puzzle",{"title":286,"path":287,"stem":288,"children":289,"page":34},"Adapters","\u002Fadapters","6.adapters",[290,293,333,348],{"title":41,"path":291,"stem":292,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":294,"path":295,"stem":296,"children":297,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[298,303,308,313,318,323,328],{"title":299,"path":300,"stem":301,"icon":302},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":304,"path":305,"stem":306,"icon":307},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":309,"path":310,"stem":311,"icon":312},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":314,"path":315,"stem":316,"icon":317},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":319,"path":320,"stem":321,"icon":322},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":324,"path":325,"stem":326,"icon":327},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":329,"path":330,"stem":331,"icon":332},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":334,"path":335,"stem":336,"children":337,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[338,343],{"title":339,"path":340,"stem":341,"icon":342},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":344,"path":345,"stem":346,"icon":347},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":349,"path":350,"stem":351,"children":352,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[353,358,363,367],{"title":354,"path":355,"stem":356,"icon":357},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline","i-lucide-workflow",{"title":359,"path":360,"stem":361,"icon":362},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":364,"path":365,"stem":366,"icon":78},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":368,"path":369,"stem":370,"icon":371},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":373,"path":374,"stem":375,"children":376,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[377,380,384],{"title":41,"path":378,"stem":379,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":381,"path":382,"stem":383,"icon":284},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":385,"path":386,"stem":387,"icon":78},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":389,"title":390,"body":391,"description":1724,"extension":1725,"links":1726,"meta":1732,"navigation":1733,"path":152,"seo":1734,"stem":153,"__hash__":1735},"docs\u002F2.logging\u002F7.audit\u002F06.recipes.md","Recipes & Reference",{"type":392,"value":393,"toc":1717},"minimark",[394,411,416,643,654,658,876,879,883,1188,1198,1202,1208,1507,1518,1522,1707,1713],[395,396,397,398,402,403,406,407,410],"p",{},"Pick the recipe that matches your sink, drop it in, and you have a tamper-evident audit log. Each recipe composes the same primitives (",[399,400,401],"code",{},"auditOnly",", ",[399,404,405],{},"signed",", optional ",[399,408,409],{},"await: true",") over different drains.",[412,413,415],"h2",{"id":414},"audit-logs-on-disk","Audit logs on disk",[417,418,419,625],"code-group",{},[420,421,427],"pre",{"className":422,"code":423,"filename":424,"language":425,"meta":426,"style":426},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { auditOnly, signed } from 'evlog'\nimport { createFsDrain } from 'evlog\u002Ffs'\n\nnitro.hooks.hook('evlog:drain', auditOnly(\n  signed(createFsDrain({ dir: '.audit', maxFiles: 30 }), { strategy: 'hash-chain' }),\n  { await: true },\n))\n","Input — server\u002Fplugins\u002Fevlog.ts","typescript","",[399,428,429,468,489,496,532,601,619],{"__ignoreMap":426},[430,431,434,438,442,446,449,452,455,458,461,465],"span",{"class":432,"line":433},"line",1,[430,435,437],{"class":436},"s7zQu","import",[430,439,441],{"class":440},"sMK4o"," {",[430,443,445],{"class":444},"sTEyZ"," auditOnly",[430,447,448],{"class":440},",",[430,450,451],{"class":444}," signed",[430,453,454],{"class":440}," }",[430,456,457],{"class":436}," from",[430,459,460],{"class":440}," '",[430,462,464],{"class":463},"sfazB","evlog",[430,466,467],{"class":440},"'\n",[430,469,471,473,475,478,480,482,484,487],{"class":432,"line":470},2,[430,472,437],{"class":436},[430,474,441],{"class":440},[430,476,477],{"class":444}," createFsDrain",[430,479,454],{"class":440},[430,481,457],{"class":436},[430,483,460],{"class":440},[430,485,486],{"class":463},"evlog\u002Ffs",[430,488,467],{"class":440},[430,490,492],{"class":432,"line":491},3,[430,493,495],{"emptyLinePlaceholder":494},true,"\n",[430,497,499,502,505,508,510,514,517,520,523,525,527,529],{"class":432,"line":498},4,[430,500,501],{"class":444},"nitro",[430,503,504],{"class":440},".",[430,506,507],{"class":444},"hooks",[430,509,504],{"class":440},[430,511,513],{"class":512},"s2Zo4","hook",[430,515,516],{"class":444},"(",[430,518,519],{"class":440},"'",[430,521,522],{"class":463},"evlog:drain",[430,524,519],{"class":440},[430,526,448],{"class":440},[430,528,445],{"class":512},[430,530,531],{"class":444},"(\n",[430,533,535,538,540,543,545,548,552,555,557,560,562,564,567,569,573,575,578,580,582,585,587,589,592,594,596,598],{"class":432,"line":534},5,[430,536,537],{"class":512},"  signed",[430,539,516],{"class":444},[430,541,542],{"class":512},"createFsDrain",[430,544,516],{"class":444},[430,546,547],{"class":440},"{",[430,549,551],{"class":550},"swJcz"," dir",[430,553,554],{"class":440},":",[430,556,460],{"class":440},[430,558,559],{"class":463},".audit",[430,561,519],{"class":440},[430,563,448],{"class":440},[430,565,566],{"class":550}," maxFiles",[430,568,554],{"class":440},[430,570,572],{"class":571},"sbssI"," 30",[430,574,454],{"class":440},[430,576,577],{"class":444},")",[430,579,448],{"class":440},[430,581,441],{"class":440},[430,583,584],{"class":550}," strategy",[430,586,554],{"class":440},[430,588,460],{"class":440},[430,590,591],{"class":463},"hash-chain",[430,593,519],{"class":440},[430,595,454],{"class":440},[430,597,577],{"class":444},[430,599,600],{"class":440},",\n",[430,602,604,607,610,612,616],{"class":432,"line":603},6,[430,605,606],{"class":440},"  {",[430,608,609],{"class":550}," await",[430,611,554],{"class":440},[430,613,615],{"class":614},"sfNiH"," true",[430,617,618],{"class":440}," },\n",[430,620,622],{"class":432,"line":621},7,[430,623,624],{"class":444},"))\n",[420,626,631],{"className":627,"code":628,"filename":629,"language":630,"meta":426,"style":426},"language-ndjson shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\"audit\":{\"action\":\"invoice.refund\",\"actor\":{\"type\":\"user\",\"id\":\"usr_42\"},\"target\":{\"type\":\"invoice\",\"id\":\"inv_889\"},\"outcome\":\"success\",\"version\":1,\"idempotencyKey\":\"ak_8f3c4b2a1e5d6f7c\",\"prevHash\":null,\"hash\":\"3f2c8e1a...\"}}\n{\"audit\":{\"action\":\"user.update\",\"actor\":{\"type\":\"user\",\"id\":\"usr_42\"},\"target\":{\"type\":\"user\",\"id\":\"usr_99\"},\"outcome\":\"success\",\"version\":1,\"idempotencyKey\":\"ak_5e7d8f9a0b1c2d3e\",\"prevHash\":\"3f2c8e1a...\",\"hash\":\"9a1b4d7c...\"}}\n","Output — .audit\u002F2026-04-24.ndjson","ndjson",[399,632,633,638],{"__ignoreMap":426},[430,634,635],{"class":432,"line":433},[430,636,637],{},"{\"audit\":{\"action\":\"invoice.refund\",\"actor\":{\"type\":\"user\",\"id\":\"usr_42\"},\"target\":{\"type\":\"invoice\",\"id\":\"inv_889\"},\"outcome\":\"success\",\"version\":1,\"idempotencyKey\":\"ak_8f3c4b2a1e5d6f7c\",\"prevHash\":null,\"hash\":\"3f2c8e1a...\"}}\n",[430,639,640],{"class":432,"line":470},[430,641,642],{},"{\"audit\":{\"action\":\"user.update\",\"actor\":{\"type\":\"user\",\"id\":\"usr_42\"},\"target\":{\"type\":\"user\",\"id\":\"usr_99\"},\"outcome\":\"success\",\"version\":1,\"idempotencyKey\":\"ak_5e7d8f9a0b1c2d3e\",\"prevHash\":\"3f2c8e1a...\",\"hash\":\"9a1b4d7c...\"}}\n",[395,644,645,646,649,650,653],{},"Each line's ",[399,647,648],{},"prevHash"," matches the previous line's ",[399,651,652],{},"hash",". Tampering with any row breaks the chain forward of that point — a verifier replays the hashes and reports the first mismatch.",[412,655,657],{"id":656},"audit-logs-to-a-dedicated-axiom-dataset","Audit logs to a dedicated Axiom dataset",[417,659,660,828,851],{},[420,661,663],{"className":422,"code":662,"filename":424,"language":425,"meta":426,"style":426},"import { auditOnly } from 'evlog'\nimport { createAxiomDrain } from 'evlog\u002Faxiom'\n\nnitro.hooks.hook('evlog:drain', createAxiomDrain({ dataset: 'logs' }))\nnitro.hooks.hook('evlog:drain', auditOnly(\n  createAxiomDrain({ dataset: 'audit', token: process.env.AXIOM_AUDIT_TOKEN }),\n))\n",[399,664,665,683,703,707,751,777,824],{"__ignoreMap":426},[430,666,667,669,671,673,675,677,679,681],{"class":432,"line":433},[430,668,437],{"class":436},[430,670,441],{"class":440},[430,672,445],{"class":444},[430,674,454],{"class":440},[430,676,457],{"class":436},[430,678,460],{"class":440},[430,680,464],{"class":463},[430,682,467],{"class":440},[430,684,685,687,689,692,694,696,698,701],{"class":432,"line":470},[430,686,437],{"class":436},[430,688,441],{"class":440},[430,690,691],{"class":444}," createAxiomDrain",[430,693,454],{"class":440},[430,695,457],{"class":436},[430,697,460],{"class":440},[430,699,700],{"class":463},"evlog\u002Faxiom",[430,702,467],{"class":440},[430,704,705],{"class":432,"line":491},[430,706,495],{"emptyLinePlaceholder":494},[430,708,709,711,713,715,717,719,721,723,725,727,729,731,733,735,738,740,742,745,747,749],{"class":432,"line":498},[430,710,501],{"class":444},[430,712,504],{"class":440},[430,714,507],{"class":444},[430,716,504],{"class":440},[430,718,513],{"class":512},[430,720,516],{"class":444},[430,722,519],{"class":440},[430,724,522],{"class":463},[430,726,519],{"class":440},[430,728,448],{"class":440},[430,730,691],{"class":512},[430,732,516],{"class":444},[430,734,547],{"class":440},[430,736,737],{"class":550}," dataset",[430,739,554],{"class":440},[430,741,460],{"class":440},[430,743,744],{"class":463},"logs",[430,746,519],{"class":440},[430,748,454],{"class":440},[430,750,624],{"class":444},[430,752,753,755,757,759,761,763,765,767,769,771,773,775],{"class":432,"line":534},[430,754,501],{"class":444},[430,756,504],{"class":440},[430,758,507],{"class":444},[430,760,504],{"class":440},[430,762,513],{"class":512},[430,764,516],{"class":444},[430,766,519],{"class":440},[430,768,522],{"class":463},[430,770,519],{"class":440},[430,772,448],{"class":440},[430,774,445],{"class":512},[430,776,531],{"class":444},[430,778,779,782,784,786,788,790,792,795,797,799,802,804,807,809,812,814,817,820,822],{"class":432,"line":603},[430,780,781],{"class":512},"  createAxiomDrain",[430,783,516],{"class":444},[430,785,547],{"class":440},[430,787,737],{"class":550},[430,789,554],{"class":440},[430,791,460],{"class":440},[430,793,794],{"class":463},"audit",[430,796,519],{"class":440},[430,798,448],{"class":440},[430,800,801],{"class":550}," token",[430,803,554],{"class":440},[430,805,806],{"class":444}," process",[430,808,504],{"class":440},[430,810,811],{"class":444},"env",[430,813,504],{"class":440},[430,815,816],{"class":444},"AXIOM_AUDIT_TOKEN ",[430,818,819],{"class":440},"}",[430,821,577],{"class":444},[430,823,600],{"class":440},[430,825,826],{"class":432,"line":621},[430,827,624],{"class":444},[420,829,834],{"className":830,"code":831,"filename":832,"language":833,"meta":426,"style":426},"language-kusto shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","['audit']\n| where audit.action == \"invoice.refund\"\n| summarize count() by audit.outcome, bin(_time, 1h)\n","Output — Axiom query","kusto",[399,835,836,841,846],{"__ignoreMap":426},[430,837,838],{"class":432,"line":433},[430,839,840],{},"['audit']\n",[430,842,843],{"class":432,"line":470},[430,844,845],{},"| where audit.action == \"invoice.refund\"\n",[430,847,848],{"class":432,"line":491},[430,849,850],{},"| summarize count() by audit.outcome, bin(_time, 1h)\n",[420,852,855],{"className":830,"code":853,"filename":854,"language":833,"meta":426,"style":426},"['audit']\n| where audit.outcome == \"denied\"\n| summarize count() by audit.actor.id, audit.action\n| order by count_ desc\n","Output — denials by actor",[399,856,857,861,866,871],{"__ignoreMap":426},[430,858,859],{"class":432,"line":433},[430,860,840],{},[430,862,863],{"class":432,"line":470},[430,864,865],{},"| where audit.outcome == \"denied\"\n",[430,867,868],{"class":432,"line":491},[430,869,870],{},"| summarize count() by audit.actor.id, audit.action\n",[430,872,873],{"class":432,"line":498},[430,874,875],{},"| order by count_ desc\n",[395,877,878],{},"Splitting datasets means the audit dataset can have a longer retention (7y), tighter access controls, and a separate billing line — without touching the rest of your pipeline.",[412,880,882],{"id":881},"audit-logs-in-postgres","Audit logs in Postgres",[417,884,885,1141],{},[420,886,888],{"className":422,"code":887,"filename":424,"language":425,"meta":426,"style":426},"import { auditOnly } from 'evlog'\nimport type { DrainContext } from 'evlog'\n\nconst postgresAudit = async (ctx: DrainContext) => {\n  await db.insert(auditEvents).values({\n    id: ctx.event.audit!.idempotencyKey,\n    timestamp: new Date(ctx.event.timestamp),\n    payload: ctx.event,\n  }).onConflictDoNothing()\n}\n\nnitro.hooks.hook('evlog:drain', auditOnly(postgresAudit, { await: true }))\n",[399,889,890,908,930,934,969,999,1026,1056,1072,1088,1094,1099],{"__ignoreMap":426},[430,891,892,894,896,898,900,902,904,906],{"class":432,"line":433},[430,893,437],{"class":436},[430,895,441],{"class":440},[430,897,445],{"class":444},[430,899,454],{"class":440},[430,901,457],{"class":436},[430,903,460],{"class":440},[430,905,464],{"class":463},[430,907,467],{"class":440},[430,909,910,912,915,917,920,922,924,926,928],{"class":432,"line":470},[430,911,437],{"class":436},[430,913,914],{"class":436}," type",[430,916,441],{"class":440},[430,918,919],{"class":444}," DrainContext",[430,921,454],{"class":440},[430,923,457],{"class":436},[430,925,460],{"class":440},[430,927,464],{"class":463},[430,929,467],{"class":440},[430,931,932],{"class":432,"line":491},[430,933,495],{"emptyLinePlaceholder":494},[430,935,936,940,943,946,949,952,956,958,961,963,966],{"class":432,"line":498},[430,937,939],{"class":938},"spNyl","const",[430,941,942],{"class":444}," postgresAudit ",[430,944,945],{"class":440},"=",[430,947,948],{"class":938}," async",[430,950,951],{"class":440}," (",[430,953,955],{"class":954},"sHdIc","ctx",[430,957,554],{"class":440},[430,959,919],{"class":960},"sBMFI",[430,962,577],{"class":440},[430,964,965],{"class":938}," =>",[430,967,968],{"class":440}," {\n",[430,970,971,974,977,979,982,984,987,989,991,994,996],{"class":432,"line":534},[430,972,973],{"class":436},"  await",[430,975,976],{"class":444}," db",[430,978,504],{"class":440},[430,980,981],{"class":512},"insert",[430,983,516],{"class":550},[430,985,986],{"class":444},"auditEvents",[430,988,577],{"class":550},[430,990,504],{"class":440},[430,992,993],{"class":512},"values",[430,995,516],{"class":550},[430,997,998],{"class":440},"{\n",[430,1000,1001,1004,1006,1009,1011,1014,1016,1018,1021,1024],{"class":432,"line":603},[430,1002,1003],{"class":550},"    id",[430,1005,554],{"class":440},[430,1007,1008],{"class":444}," ctx",[430,1010,504],{"class":440},[430,1012,1013],{"class":444},"event",[430,1015,504],{"class":440},[430,1017,794],{"class":444},[430,1019,1020],{"class":440},"!.",[430,1022,1023],{"class":444},"idempotencyKey",[430,1025,600],{"class":440},[430,1027,1028,1031,1033,1036,1039,1041,1043,1045,1047,1049,1052,1054],{"class":432,"line":621},[430,1029,1030],{"class":550},"    timestamp",[430,1032,554],{"class":440},[430,1034,1035],{"class":440}," new",[430,1037,1038],{"class":512}," Date",[430,1040,516],{"class":550},[430,1042,955],{"class":444},[430,1044,504],{"class":440},[430,1046,1013],{"class":444},[430,1048,504],{"class":440},[430,1050,1051],{"class":444},"timestamp",[430,1053,577],{"class":550},[430,1055,600],{"class":440},[430,1057,1059,1062,1064,1066,1068,1070],{"class":432,"line":1058},8,[430,1060,1061],{"class":550},"    payload",[430,1063,554],{"class":440},[430,1065,1008],{"class":444},[430,1067,504],{"class":440},[430,1069,1013],{"class":444},[430,1071,600],{"class":440},[430,1073,1075,1078,1080,1082,1085],{"class":432,"line":1074},9,[430,1076,1077],{"class":440},"  }",[430,1079,577],{"class":550},[430,1081,504],{"class":440},[430,1083,1084],{"class":512},"onConflictDoNothing",[430,1086,1087],{"class":550},"()\n",[430,1089,1091],{"class":432,"line":1090},10,[430,1092,1093],{"class":440},"}\n",[430,1095,1097],{"class":432,"line":1096},11,[430,1098,495],{"emptyLinePlaceholder":494},[430,1100,1102,1104,1106,1108,1110,1112,1114,1116,1118,1120,1122,1124,1127,1129,1131,1133,1135,1137,1139],{"class":432,"line":1101},12,[430,1103,501],{"class":444},[430,1105,504],{"class":440},[430,1107,507],{"class":444},[430,1109,504],{"class":440},[430,1111,513],{"class":512},[430,1113,516],{"class":444},[430,1115,519],{"class":440},[430,1117,522],{"class":463},[430,1119,519],{"class":440},[430,1121,448],{"class":440},[430,1123,445],{"class":512},[430,1125,1126],{"class":444},"(postgresAudit",[430,1128,448],{"class":440},[430,1130,441],{"class":440},[430,1132,609],{"class":550},[430,1134,554],{"class":440},[430,1136,615],{"class":614},[430,1138,454],{"class":440},[430,1140,624],{"class":444},[420,1142,1147],{"className":1143,"code":1144,"filename":1145,"language":1146,"meta":426,"style":426},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","SELECT id, timestamp, payload->'audit'->>'action' AS action,\n       payload->'audit'->>'outcome' AS outcome\nFROM audit_events\nWHERE id = 'ak_8f3c4b2a1e5d6f7c';\n\n--          id          |       timestamp       |     action      | outcome\n-- ---------------------+-----------------------+-----------------+---------\n--  ak_8f3c4b2a1e5d6f7c | 2026-04-24 10:23:45.6 | invoice.refund  | success\n","Output — audit_events row","sql",[399,1148,1149,1154,1159,1164,1169,1173,1178,1183],{"__ignoreMap":426},[430,1150,1151],{"class":432,"line":433},[430,1152,1153],{},"SELECT id, timestamp, payload->'audit'->>'action' AS action,\n",[430,1155,1156],{"class":432,"line":470},[430,1157,1158],{},"       payload->'audit'->>'outcome' AS outcome\n",[430,1160,1161],{"class":432,"line":491},[430,1162,1163],{},"FROM audit_events\n",[430,1165,1166],{"class":432,"line":498},[430,1167,1168],{},"WHERE id = 'ak_8f3c4b2a1e5d6f7c';\n",[430,1170,1171],{"class":432,"line":534},[430,1172,495],{"emptyLinePlaceholder":494},[430,1174,1175],{"class":432,"line":603},[430,1176,1177],{},"--          id          |       timestamp       |     action      | outcome\n",[430,1179,1180],{"class":432,"line":621},[430,1181,1182],{},"-- ---------------------+-----------------------+-----------------+---------\n",[430,1184,1185],{"class":432,"line":1058},[430,1186,1187],{},"--  ak_8f3c4b2a1e5d6f7c | 2026-04-24 10:23:45.6 | invoice.refund  | success\n",[395,1189,1190,1191,1193,1194,1197],{},"The deterministic ",[399,1192,1023],{}," makes retries safe — duplicate inserts collapse via ",[399,1195,1196],{},"ON CONFLICT DO NOTHING",". Without it, a transient network blip during a retry would create a duplicate audit row, which is exactly what you don't want.",[412,1199,1201],{"id":1200},"testing-audits","Testing audits",[395,1203,1204,1207],{},[399,1205,1206],{},"mockAudit()"," captures every audit event emitted during a test:",[420,1209,1211],{"className":422,"code":1210,"language":425,"meta":426,"style":426},"import { mockAudit } from 'evlog'\n\nit('refunds the invoice and records an audit', async () => {\n  const captured = mockAudit()\n\n  await refundInvoice({ id: 'inv_889' }, { actor: { type: 'user', id: 'u1' } })\n\n  expect(captured.events).toHaveLength(1)\n  expect(captured.toIncludeAuditOf({\n    action: 'invoice.refund',\n    target: { type: 'invoice', id: 'inv_889' },\n    outcome: 'success',\n  })).toBe(true)\n\n  captured.restore()\n})\n",[399,1212,1213,1232,1236,1261,1276,1280,1346,1350,1379,1396,1412,1446,1462,1482,1487,1500],{"__ignoreMap":426},[430,1214,1215,1217,1219,1222,1224,1226,1228,1230],{"class":432,"line":433},[430,1216,437],{"class":436},[430,1218,441],{"class":440},[430,1220,1221],{"class":444}," mockAudit",[430,1223,454],{"class":440},[430,1225,457],{"class":436},[430,1227,460],{"class":440},[430,1229,464],{"class":463},[430,1231,467],{"class":440},[430,1233,1234],{"class":432,"line":470},[430,1235,495],{"emptyLinePlaceholder":494},[430,1237,1238,1241,1243,1245,1248,1250,1252,1254,1257,1259],{"class":432,"line":491},[430,1239,1240],{"class":512},"it",[430,1242,516],{"class":444},[430,1244,519],{"class":440},[430,1246,1247],{"class":463},"refunds the invoice and records an audit",[430,1249,519],{"class":440},[430,1251,448],{"class":440},[430,1253,948],{"class":938},[430,1255,1256],{"class":440}," ()",[430,1258,965],{"class":938},[430,1260,968],{"class":440},[430,1262,1263,1266,1269,1272,1274],{"class":432,"line":498},[430,1264,1265],{"class":938},"  const",[430,1267,1268],{"class":444}," captured",[430,1270,1271],{"class":440}," =",[430,1273,1221],{"class":512},[430,1275,1087],{"class":550},[430,1277,1278],{"class":432,"line":534},[430,1279,495],{"emptyLinePlaceholder":494},[430,1281,1282,1284,1287,1289,1291,1294,1296,1298,1301,1303,1306,1308,1311,1313,1315,1317,1319,1321,1324,1326,1328,1330,1332,1334,1337,1339,1341,1343],{"class":432,"line":603},[430,1283,973],{"class":436},[430,1285,1286],{"class":512}," refundInvoice",[430,1288,516],{"class":550},[430,1290,547],{"class":440},[430,1292,1293],{"class":550}," id",[430,1295,554],{"class":440},[430,1297,460],{"class":440},[430,1299,1300],{"class":463},"inv_889",[430,1302,519],{"class":440},[430,1304,1305],{"class":440}," },",[430,1307,441],{"class":440},[430,1309,1310],{"class":550}," actor",[430,1312,554],{"class":440},[430,1314,441],{"class":440},[430,1316,914],{"class":550},[430,1318,554],{"class":440},[430,1320,460],{"class":440},[430,1322,1323],{"class":463},"user",[430,1325,519],{"class":440},[430,1327,448],{"class":440},[430,1329,1293],{"class":550},[430,1331,554],{"class":440},[430,1333,460],{"class":440},[430,1335,1336],{"class":463},"u1",[430,1338,519],{"class":440},[430,1340,454],{"class":440},[430,1342,454],{"class":440},[430,1344,1345],{"class":550},")\n",[430,1347,1348],{"class":432,"line":621},[430,1349,495],{"emptyLinePlaceholder":494},[430,1351,1352,1355,1357,1360,1362,1365,1367,1369,1372,1374,1377],{"class":432,"line":1058},[430,1353,1354],{"class":512},"  expect",[430,1356,516],{"class":550},[430,1358,1359],{"class":444},"captured",[430,1361,504],{"class":440},[430,1363,1364],{"class":444},"events",[430,1366,577],{"class":550},[430,1368,504],{"class":440},[430,1370,1371],{"class":512},"toHaveLength",[430,1373,516],{"class":550},[430,1375,1376],{"class":571},"1",[430,1378,1345],{"class":550},[430,1380,1381,1383,1385,1387,1389,1392,1394],{"class":432,"line":1074},[430,1382,1354],{"class":512},[430,1384,516],{"class":550},[430,1386,1359],{"class":444},[430,1388,504],{"class":440},[430,1390,1391],{"class":512},"toIncludeAuditOf",[430,1393,516],{"class":550},[430,1395,998],{"class":440},[430,1397,1398,1401,1403,1405,1408,1410],{"class":432,"line":1090},[430,1399,1400],{"class":550},"    action",[430,1402,554],{"class":440},[430,1404,460],{"class":440},[430,1406,1407],{"class":463},"invoice.refund",[430,1409,519],{"class":440},[430,1411,600],{"class":440},[430,1413,1414,1417,1419,1421,1423,1425,1427,1430,1432,1434,1436,1438,1440,1442,1444],{"class":432,"line":1096},[430,1415,1416],{"class":550},"    target",[430,1418,554],{"class":440},[430,1420,441],{"class":440},[430,1422,914],{"class":550},[430,1424,554],{"class":440},[430,1426,460],{"class":440},[430,1428,1429],{"class":463},"invoice",[430,1431,519],{"class":440},[430,1433,448],{"class":440},[430,1435,1293],{"class":550},[430,1437,554],{"class":440},[430,1439,460],{"class":440},[430,1441,1300],{"class":463},[430,1443,519],{"class":440},[430,1445,618],{"class":440},[430,1447,1448,1451,1453,1455,1458,1460],{"class":432,"line":1101},[430,1449,1450],{"class":550},"    outcome",[430,1452,554],{"class":440},[430,1454,460],{"class":440},[430,1456,1457],{"class":463},"success",[430,1459,519],{"class":440},[430,1461,600],{"class":440},[430,1463,1465,1467,1470,1472,1475,1477,1480],{"class":432,"line":1464},13,[430,1466,1077],{"class":440},[430,1468,1469],{"class":550},"))",[430,1471,504],{"class":440},[430,1473,1474],{"class":512},"toBe",[430,1476,516],{"class":550},[430,1478,1479],{"class":614},"true",[430,1481,1345],{"class":550},[430,1483,1485],{"class":432,"line":1484},14,[430,1486,495],{"emptyLinePlaceholder":494},[430,1488,1490,1493,1495,1498],{"class":432,"line":1489},15,[430,1491,1492],{"class":444},"  captured",[430,1494,504],{"class":440},[430,1496,1497],{"class":512},"restore",[430,1499,1087],{"class":550},[430,1501,1503,1505],{"class":432,"line":1502},16,[430,1504,819],{"class":440},[430,1506,1345],{"class":444},[395,1508,1509,1510,1513,1514,1517],{},"Always call ",[399,1511,1512],{},"captured.restore()"," in an ",[399,1515,1516],{},"afterEach"," (or wrap with a fixture) so a failing assertion never leaks into the next test.",[412,1519,1521],{"id":1520},"api-reference","API Reference",[1523,1524,1525,1541],"table",{},[1526,1527,1528],"thead",{},[1529,1530,1531,1535,1538],"tr",{},[1532,1533,1534],"th",{},"Symbol",[1532,1536,1537],{},"Kind",[1532,1539,1540],{},"Notes",[1542,1543,1544,1558,1571,1588,1600,1613,1626,1642,1654,1667,1682,1694],"tbody",{},[1529,1545,1546,1552,1555],{},[1547,1548,1549],"td",{},[399,1550,1551],{},"AuditFields",[1547,1553,1554],{},"type",[1547,1556,1557],{},"Reserved field on the wide event",[1529,1559,1560,1565,1568],{},[1547,1561,1562],{},[399,1563,1564],{},"defineAuditAction(name, opts?)",[1547,1566,1567],{},"factory",[1547,1569,1570],{},"Typed action registry, infers target shape",[1529,1572,1573,1578,1581],{},[1547,1574,1575],{},[399,1576,1577],{},"log.audit(fields)",[1547,1579,1580],{},"method",[1547,1582,1583,1584,1587],{},"Sugar over ",[399,1585,1586],{},"log.set({ audit })"," + force-keep",[1529,1589,1590,1595,1597],{},[1547,1591,1592],{},[399,1593,1594],{},"log.audit.deny(reason, fields)",[1547,1596,1580],{},[1547,1598,1599],{},"Records a denied action",[1529,1601,1602,1607,1610],{},[1547,1603,1604],{},[399,1605,1606],{},"audit(fields)",[1547,1608,1609],{},"function",[1547,1611,1612],{},"Standalone for scripts \u002F jobs",[1529,1614,1615,1620,1623],{},[1547,1616,1617],{},[399,1618,1619],{},"withAudit({ action, target })(fn)",[1547,1621,1622],{},"wrapper",[1547,1624,1625],{},"Auto-emit success \u002F failure \u002F denied",[1529,1627,1628,1633,1636],{},[1547,1629,1630],{},[399,1631,1632],{},"auditDiff(before, after)",[1547,1634,1635],{},"helper",[1547,1637,1638,1639],{},"Redact-aware JSON Patch for ",[399,1640,1641],{},"changes",[1529,1643,1644,1648,1651],{},[1547,1645,1646],{},[399,1647,1206],{},[1547,1649,1650],{},"test util",[1547,1652,1653],{},"Capture + assert audits in tests",[1529,1655,1656,1661,1664],{},[1547,1657,1658],{},[399,1659,1660],{},"auditEnricher(opts?)",[1547,1662,1663],{},"enricher",[1547,1665,1666],{},"Auto-fill request \u002F runtime \u002F tenant context",[1529,1668,1669,1674,1676],{},[1547,1670,1671],{},[399,1672,1673],{},"auditOnly(drain, { await? })",[1547,1675,1622],{},[1547,1677,1678,1679,1681],{},"Routes only events with an ",[399,1680,794],{}," field",[1529,1683,1684,1689,1691],{},[1547,1685,1686],{},[399,1687,1688],{},"signed(drain, opts)",[1547,1690,1622],{},[1547,1692,1693],{},"Generic integrity wrapper (hmac \u002F hash-chain)",[1529,1695,1696,1701,1704],{},[1547,1697,1698],{},[399,1699,1700],{},"auditRedactPreset",[1547,1702,1703],{},"config",[1547,1705,1706],{},"Strict PII for audit events",[395,1708,1709,1710,1712],{},"Everything ships from the main ",[399,1711,464],{}," entrypoint.",[1714,1715,1716],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":426,"searchDepth":470,"depth":470,"links":1718},[1719,1720,1721,1722,1723],{"id":414,"depth":470,"text":415},{"id":656,"depth":470,"text":657},{"id":881,"depth":470,"text":882},{"id":1200,"depth":470,"text":1201},{"id":1520,"depth":470,"text":1521},"File system, Axiom, and Postgres recipes for audit logs, plus mockAudit for tests and the full API reference.","md",[1727,1730],{"label":147,"icon":124,"to":148,"color":1728,"variant":1729},"neutral","subtle",{"label":286,"icon":1731,"to":291,"color":1728,"variant":1729},"i-lucide-plug",{},{"title":151,"icon":154},{"title":390,"description":1724},"rdVDH1xZlBLYv6yNWVG4mh-QfAjXxoItITjS8nxzHes",[1737,1739],{"title":147,"path":148,"stem":149,"description":1738,"icon":124,"children":-1},"Integrity, redact presets, GDPR vs append-only, retention windows, and the most common pitfalls when shipping audit logs to production.",{"title":161,"path":162,"stem":163,"description":1740,"icon":164,"children":-1},"Understand the full lifecycle of an evlog event, from creation to drain. Covers all three modes (simple logging, wide events, request logging), sampling, enrichment, and delivery.",1777911266695]