[{"data":1,"prerenderedAt":1757},["ShallowReactive",2],{"navigation_docs":3,"-logging-audit-recipes":392,"-logging-audit-recipes-surround":1752},[4,35,159,201,289,376],{"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},"Adapters","\u002Fadapters","6.adapters",[294,297,337,352],{"title":41,"path":295,"stem":296,"icon":44},"\u002Fadapters\u002Foverview","6.adapters\u002F01.overview",{"title":298,"path":299,"stem":300,"children":301,"page":34},"Cloud destinations","\u002Fadapters\u002Fcloud","6.adapters\u002F02.cloud",[302,307,312,317,322,327,332],{"title":303,"path":304,"stem":305,"icon":306},"Axiom","\u002Fadapters\u002Fcloud\u002Faxiom","6.adapters\u002F02.cloud\u002F01.axiom","i-custom-axiom",{"title":308,"path":309,"stem":310,"icon":311},"OTLP","\u002Fadapters\u002Fcloud\u002Fotlp","6.adapters\u002F02.cloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":313,"path":314,"stem":315,"icon":316},"PostHog","\u002Fadapters\u002Fcloud\u002Fposthog","6.adapters\u002F02.cloud\u002F03.posthog","i-simple-icons-posthog",{"title":318,"path":319,"stem":320,"icon":321},"Sentry","\u002Fadapters\u002Fcloud\u002Fsentry","6.adapters\u002F02.cloud\u002F04.sentry","i-simple-icons-sentry",{"title":323,"path":324,"stem":325,"icon":326},"Better Stack","\u002Fadapters\u002Fcloud\u002Fbetter-stack","6.adapters\u002F02.cloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":328,"path":329,"stem":330,"icon":331},"Datadog","\u002Fadapters\u002Fcloud\u002Fdatadog","6.adapters\u002F02.cloud\u002F06.datadog","i-simple-icons-datadog",{"title":333,"path":334,"stem":335,"icon":336},"HyperDX","\u002Fadapters\u002Fcloud\u002Fhyperdx","6.adapters\u002F02.cloud\u002F07.hyperdx","i-custom-hyperdx",{"title":338,"path":339,"stem":340,"children":341,"page":34},"Self-hosted","\u002Fadapters\u002Fself-hosted","6.adapters\u002F03.self-hosted",[342,347],{"title":343,"path":344,"stem":345,"icon":346},"File System","\u002Fadapters\u002Fself-hosted\u002Ffs","6.adapters\u002F03.self-hosted\u002F01.fs","i-lucide-hard-drive",{"title":348,"path":349,"stem":350,"icon":351},"NuxtHub","\u002Fadapters\u002Fself-hosted\u002Fnuxthub","6.adapters\u002F03.self-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":353,"path":354,"stem":355,"children":356,"page":34},"Building blocks","\u002Fadapters\u002Fbuilding-blocks","6.adapters\u002F04.building-blocks",[357,362,367,371],{"title":358,"path":359,"stem":360,"icon":361},"Pipeline","\u002Fadapters\u002Fbuilding-blocks\u002Fpipeline","6.adapters\u002F04.building-blocks\u002F01.pipeline","i-lucide-workflow",{"title":363,"path":364,"stem":365,"icon":366},"HTTP","\u002Fadapters\u002Fbuilding-blocks\u002Fhttp","6.adapters\u002F04.building-blocks\u002F02.http","i-lucide-globe",{"title":368,"path":369,"stem":370,"icon":83},"Custom Adapters","\u002Fadapters\u002Fbuilding-blocks\u002Fcustom","6.adapters\u002F04.building-blocks\u002F03.custom",{"title":372,"path":373,"stem":374,"icon":375},"Toolkit","\u002Fadapters\u002Fbuilding-blocks\u002Ftoolkit","6.adapters\u002F04.building-blocks\u002F04.toolkit","i-lucide-blocks",{"title":377,"path":378,"stem":379,"children":380,"page":34},"Enrichers","\u002Fenrichers","7.enrichers",[381,384,388],{"title":41,"path":382,"stem":383,"icon":28},"\u002Fenrichers\u002Foverview","7.enrichers\u002F1.overview",{"title":385,"path":386,"stem":387,"icon":288},"Built-in","\u002Fenrichers\u002Fbuilt-in","7.enrichers\u002F2.built-in",{"title":389,"path":390,"stem":391,"icon":83},"Custom","\u002Fenrichers\u002Fcustom","7.enrichers\u002F3.custom",{"id":393,"title":394,"body":395,"description":1740,"extension":1741,"links":1742,"meta":1748,"navigation":1749,"path":157,"seo":1750,"stem":158,"__hash__":1751},"docs\u002F2.logging\u002F8.audit\u002F06.recipes.md","Recipes & Reference",{"type":396,"value":397,"toc":1733},"minimark",[398,415,420,647,658,662,880,883,887,1192,1202,1206,1212,1511,1522,1526,1723,1729],[399,400,401,402,406,407,410,411,414],"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 (",[403,404,405],"code",{},"auditOnly",", ",[403,408,409],{},"signed",", optional ",[403,412,413],{},"await: true",") over different drains.",[416,417,419],"h2",{"id":418},"audit-logs-on-disk","Audit logs on disk",[421,422,423,629],"code-group",{},[424,425,431],"pre",{"className":426,"code":427,"filename":428,"language":429,"meta":430,"style":430},"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","",[403,432,433,472,493,500,536,605,623],{"__ignoreMap":430},[434,435,438,442,446,450,453,456,459,462,465,469],"span",{"class":436,"line":437},"line",1,[434,439,441],{"class":440},"s7zQu","import",[434,443,445],{"class":444},"sMK4o"," {",[434,447,449],{"class":448},"sTEyZ"," auditOnly",[434,451,452],{"class":444},",",[434,454,455],{"class":448}," signed",[434,457,458],{"class":444}," }",[434,460,461],{"class":440}," from",[434,463,464],{"class":444}," '",[434,466,468],{"class":467},"sfazB","evlog",[434,470,471],{"class":444},"'\n",[434,473,475,477,479,482,484,486,488,491],{"class":436,"line":474},2,[434,476,441],{"class":440},[434,478,445],{"class":444},[434,480,481],{"class":448}," createFsDrain",[434,483,458],{"class":444},[434,485,461],{"class":440},[434,487,464],{"class":444},[434,489,490],{"class":467},"evlog\u002Ffs",[434,492,471],{"class":444},[434,494,496],{"class":436,"line":495},3,[434,497,499],{"emptyLinePlaceholder":498},true,"\n",[434,501,503,506,509,512,514,518,521,524,527,529,531,533],{"class":436,"line":502},4,[434,504,505],{"class":448},"nitro",[434,507,508],{"class":444},".",[434,510,511],{"class":448},"hooks",[434,513,508],{"class":444},[434,515,517],{"class":516},"s2Zo4","hook",[434,519,520],{"class":448},"(",[434,522,523],{"class":444},"'",[434,525,526],{"class":467},"evlog:drain",[434,528,523],{"class":444},[434,530,452],{"class":444},[434,532,449],{"class":516},[434,534,535],{"class":448},"(\n",[434,537,539,542,544,547,549,552,556,559,561,564,566,568,571,573,577,579,582,584,586,589,591,593,596,598,600,602],{"class":436,"line":538},5,[434,540,541],{"class":516},"  signed",[434,543,520],{"class":448},[434,545,546],{"class":516},"createFsDrain",[434,548,520],{"class":448},[434,550,551],{"class":444},"{",[434,553,555],{"class":554},"swJcz"," dir",[434,557,558],{"class":444},":",[434,560,464],{"class":444},[434,562,563],{"class":467},".audit",[434,565,523],{"class":444},[434,567,452],{"class":444},[434,569,570],{"class":554}," maxFiles",[434,572,558],{"class":444},[434,574,576],{"class":575},"sbssI"," 30",[434,578,458],{"class":444},[434,580,581],{"class":448},")",[434,583,452],{"class":444},[434,585,445],{"class":444},[434,587,588],{"class":554}," strategy",[434,590,558],{"class":444},[434,592,464],{"class":444},[434,594,595],{"class":467},"hash-chain",[434,597,523],{"class":444},[434,599,458],{"class":444},[434,601,581],{"class":448},[434,603,604],{"class":444},",\n",[434,606,608,611,614,616,620],{"class":436,"line":607},6,[434,609,610],{"class":444},"  {",[434,612,613],{"class":554}," await",[434,615,558],{"class":444},[434,617,619],{"class":618},"sfNiH"," true",[434,621,622],{"class":444}," },\n",[434,624,626],{"class":436,"line":625},7,[434,627,628],{"class":448},"))\n",[424,630,635],{"className":631,"code":632,"filename":633,"language":634,"meta":430,"style":430},"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",[403,636,637,642],{"__ignoreMap":430},[434,638,639],{"class":436,"line":437},[434,640,641],{},"{\"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",[434,643,644],{"class":436,"line":474},[434,645,646],{},"{\"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",[399,648,649,650,653,654,657],{},"Each line's ",[403,651,652],{},"prevHash"," matches the previous line's ",[403,655,656],{},"hash",". Tampering with any row breaks the chain forward of that point — a verifier replays the hashes and reports the first mismatch.",[416,659,661],{"id":660},"audit-logs-to-a-dedicated-axiom-dataset","Audit logs to a dedicated Axiom dataset",[421,663,664,832,855],{},[424,665,667],{"className":426,"code":666,"filename":428,"language":429,"meta":430,"style":430},"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",[403,668,669,687,707,711,755,781,828],{"__ignoreMap":430},[434,670,671,673,675,677,679,681,683,685],{"class":436,"line":437},[434,672,441],{"class":440},[434,674,445],{"class":444},[434,676,449],{"class":448},[434,678,458],{"class":444},[434,680,461],{"class":440},[434,682,464],{"class":444},[434,684,468],{"class":467},[434,686,471],{"class":444},[434,688,689,691,693,696,698,700,702,705],{"class":436,"line":474},[434,690,441],{"class":440},[434,692,445],{"class":444},[434,694,695],{"class":448}," createAxiomDrain",[434,697,458],{"class":444},[434,699,461],{"class":440},[434,701,464],{"class":444},[434,703,704],{"class":467},"evlog\u002Faxiom",[434,706,471],{"class":444},[434,708,709],{"class":436,"line":495},[434,710,499],{"emptyLinePlaceholder":498},[434,712,713,715,717,719,721,723,725,727,729,731,733,735,737,739,742,744,746,749,751,753],{"class":436,"line":502},[434,714,505],{"class":448},[434,716,508],{"class":444},[434,718,511],{"class":448},[434,720,508],{"class":444},[434,722,517],{"class":516},[434,724,520],{"class":448},[434,726,523],{"class":444},[434,728,526],{"class":467},[434,730,523],{"class":444},[434,732,452],{"class":444},[434,734,695],{"class":516},[434,736,520],{"class":448},[434,738,551],{"class":444},[434,740,741],{"class":554}," dataset",[434,743,558],{"class":444},[434,745,464],{"class":444},[434,747,748],{"class":467},"logs",[434,750,523],{"class":444},[434,752,458],{"class":444},[434,754,628],{"class":448},[434,756,757,759,761,763,765,767,769,771,773,775,777,779],{"class":436,"line":538},[434,758,505],{"class":448},[434,760,508],{"class":444},[434,762,511],{"class":448},[434,764,508],{"class":444},[434,766,517],{"class":516},[434,768,520],{"class":448},[434,770,523],{"class":444},[434,772,526],{"class":467},[434,774,523],{"class":444},[434,776,452],{"class":444},[434,778,449],{"class":516},[434,780,535],{"class":448},[434,782,783,786,788,790,792,794,796,799,801,803,806,808,811,813,816,818,821,824,826],{"class":436,"line":607},[434,784,785],{"class":516},"  createAxiomDrain",[434,787,520],{"class":448},[434,789,551],{"class":444},[434,791,741],{"class":554},[434,793,558],{"class":444},[434,795,464],{"class":444},[434,797,798],{"class":467},"audit",[434,800,523],{"class":444},[434,802,452],{"class":444},[434,804,805],{"class":554}," token",[434,807,558],{"class":444},[434,809,810],{"class":448}," process",[434,812,508],{"class":444},[434,814,815],{"class":448},"env",[434,817,508],{"class":444},[434,819,820],{"class":448},"AXIOM_AUDIT_TOKEN ",[434,822,823],{"class":444},"}",[434,825,581],{"class":448},[434,827,604],{"class":444},[434,829,830],{"class":436,"line":625},[434,831,628],{"class":448},[424,833,838],{"className":834,"code":835,"filename":836,"language":837,"meta":430,"style":430},"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",[403,839,840,845,850],{"__ignoreMap":430},[434,841,842],{"class":436,"line":437},[434,843,844],{},"['audit']\n",[434,846,847],{"class":436,"line":474},[434,848,849],{},"| where audit.action == \"invoice.refund\"\n",[434,851,852],{"class":436,"line":495},[434,853,854],{},"| summarize count() by audit.outcome, bin(_time, 1h)\n",[424,856,859],{"className":834,"code":857,"filename":858,"language":837,"meta":430,"style":430},"['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",[403,860,861,865,870,875],{"__ignoreMap":430},[434,862,863],{"class":436,"line":437},[434,864,844],{},[434,866,867],{"class":436,"line":474},[434,868,869],{},"| where audit.outcome == \"denied\"\n",[434,871,872],{"class":436,"line":495},[434,873,874],{},"| summarize count() by audit.actor.id, audit.action\n",[434,876,877],{"class":436,"line":502},[434,878,879],{},"| order by count_ desc\n",[399,881,882],{},"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.",[416,884,886],{"id":885},"audit-logs-in-postgres","Audit logs in Postgres",[421,888,889,1145],{},[424,890,892],{"className":426,"code":891,"filename":428,"language":429,"meta":430,"style":430},"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",[403,893,894,912,934,938,973,1003,1030,1060,1076,1092,1098,1103],{"__ignoreMap":430},[434,895,896,898,900,902,904,906,908,910],{"class":436,"line":437},[434,897,441],{"class":440},[434,899,445],{"class":444},[434,901,449],{"class":448},[434,903,458],{"class":444},[434,905,461],{"class":440},[434,907,464],{"class":444},[434,909,468],{"class":467},[434,911,471],{"class":444},[434,913,914,916,919,921,924,926,928,930,932],{"class":436,"line":474},[434,915,441],{"class":440},[434,917,918],{"class":440}," type",[434,920,445],{"class":444},[434,922,923],{"class":448}," DrainContext",[434,925,458],{"class":444},[434,927,461],{"class":440},[434,929,464],{"class":444},[434,931,468],{"class":467},[434,933,471],{"class":444},[434,935,936],{"class":436,"line":495},[434,937,499],{"emptyLinePlaceholder":498},[434,939,940,944,947,950,953,956,960,962,965,967,970],{"class":436,"line":502},[434,941,943],{"class":942},"spNyl","const",[434,945,946],{"class":448}," postgresAudit ",[434,948,949],{"class":444},"=",[434,951,952],{"class":942}," async",[434,954,955],{"class":444}," (",[434,957,959],{"class":958},"sHdIc","ctx",[434,961,558],{"class":444},[434,963,923],{"class":964},"sBMFI",[434,966,581],{"class":444},[434,968,969],{"class":942}," =>",[434,971,972],{"class":444}," {\n",[434,974,975,978,981,983,986,988,991,993,995,998,1000],{"class":436,"line":538},[434,976,977],{"class":440},"  await",[434,979,980],{"class":448}," db",[434,982,508],{"class":444},[434,984,985],{"class":516},"insert",[434,987,520],{"class":554},[434,989,990],{"class":448},"auditEvents",[434,992,581],{"class":554},[434,994,508],{"class":444},[434,996,997],{"class":516},"values",[434,999,520],{"class":554},[434,1001,1002],{"class":444},"{\n",[434,1004,1005,1008,1010,1013,1015,1018,1020,1022,1025,1028],{"class":436,"line":607},[434,1006,1007],{"class":554},"    id",[434,1009,558],{"class":444},[434,1011,1012],{"class":448}," ctx",[434,1014,508],{"class":444},[434,1016,1017],{"class":448},"event",[434,1019,508],{"class":444},[434,1021,798],{"class":448},[434,1023,1024],{"class":444},"!.",[434,1026,1027],{"class":448},"idempotencyKey",[434,1029,604],{"class":444},[434,1031,1032,1035,1037,1040,1043,1045,1047,1049,1051,1053,1056,1058],{"class":436,"line":625},[434,1033,1034],{"class":554},"    timestamp",[434,1036,558],{"class":444},[434,1038,1039],{"class":444}," new",[434,1041,1042],{"class":516}," Date",[434,1044,520],{"class":554},[434,1046,959],{"class":448},[434,1048,508],{"class":444},[434,1050,1017],{"class":448},[434,1052,508],{"class":444},[434,1054,1055],{"class":448},"timestamp",[434,1057,581],{"class":554},[434,1059,604],{"class":444},[434,1061,1063,1066,1068,1070,1072,1074],{"class":436,"line":1062},8,[434,1064,1065],{"class":554},"    payload",[434,1067,558],{"class":444},[434,1069,1012],{"class":448},[434,1071,508],{"class":444},[434,1073,1017],{"class":448},[434,1075,604],{"class":444},[434,1077,1079,1082,1084,1086,1089],{"class":436,"line":1078},9,[434,1080,1081],{"class":444},"  }",[434,1083,581],{"class":554},[434,1085,508],{"class":444},[434,1087,1088],{"class":516},"onConflictDoNothing",[434,1090,1091],{"class":554},"()\n",[434,1093,1095],{"class":436,"line":1094},10,[434,1096,1097],{"class":444},"}\n",[434,1099,1101],{"class":436,"line":1100},11,[434,1102,499],{"emptyLinePlaceholder":498},[434,1104,1106,1108,1110,1112,1114,1116,1118,1120,1122,1124,1126,1128,1131,1133,1135,1137,1139,1141,1143],{"class":436,"line":1105},12,[434,1107,505],{"class":448},[434,1109,508],{"class":444},[434,1111,511],{"class":448},[434,1113,508],{"class":444},[434,1115,517],{"class":516},[434,1117,520],{"class":448},[434,1119,523],{"class":444},[434,1121,526],{"class":467},[434,1123,523],{"class":444},[434,1125,452],{"class":444},[434,1127,449],{"class":516},[434,1129,1130],{"class":448},"(postgresAudit",[434,1132,452],{"class":444},[434,1134,445],{"class":444},[434,1136,613],{"class":554},[434,1138,558],{"class":444},[434,1140,619],{"class":618},[434,1142,458],{"class":444},[434,1144,628],{"class":448},[424,1146,1151],{"className":1147,"code":1148,"filename":1149,"language":1150,"meta":430,"style":430},"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",[403,1152,1153,1158,1163,1168,1173,1177,1182,1187],{"__ignoreMap":430},[434,1154,1155],{"class":436,"line":437},[434,1156,1157],{},"SELECT id, timestamp, payload->'audit'->>'action' AS action,\n",[434,1159,1160],{"class":436,"line":474},[434,1161,1162],{},"       payload->'audit'->>'outcome' AS outcome\n",[434,1164,1165],{"class":436,"line":495},[434,1166,1167],{},"FROM audit_events\n",[434,1169,1170],{"class":436,"line":502},[434,1171,1172],{},"WHERE id = 'ak_8f3c4b2a1e5d6f7c';\n",[434,1174,1175],{"class":436,"line":538},[434,1176,499],{"emptyLinePlaceholder":498},[434,1178,1179],{"class":436,"line":607},[434,1180,1181],{},"--          id          |       timestamp       |     action      | outcome\n",[434,1183,1184],{"class":436,"line":625},[434,1185,1186],{},"-- ---------------------+-----------------------+-----------------+---------\n",[434,1188,1189],{"class":436,"line":1062},[434,1190,1191],{},"--  ak_8f3c4b2a1e5d6f7c | 2026-04-24 10:23:45.6 | invoice.refund  | success\n",[399,1193,1194,1195,1197,1198,1201],{},"The deterministic ",[403,1196,1027],{}," makes retries safe — duplicate inserts collapse via ",[403,1199,1200],{},"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.",[416,1203,1205],{"id":1204},"testing-audits","Testing audits",[399,1207,1208,1211],{},[403,1209,1210],{},"mockAudit()"," captures every audit event emitted during a test:",[424,1213,1215],{"className":426,"code":1214,"language":429,"meta":430,"style":430},"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",[403,1216,1217,1236,1240,1265,1280,1284,1350,1354,1383,1400,1416,1450,1466,1486,1491,1504],{"__ignoreMap":430},[434,1218,1219,1221,1223,1226,1228,1230,1232,1234],{"class":436,"line":437},[434,1220,441],{"class":440},[434,1222,445],{"class":444},[434,1224,1225],{"class":448}," mockAudit",[434,1227,458],{"class":444},[434,1229,461],{"class":440},[434,1231,464],{"class":444},[434,1233,468],{"class":467},[434,1235,471],{"class":444},[434,1237,1238],{"class":436,"line":474},[434,1239,499],{"emptyLinePlaceholder":498},[434,1241,1242,1245,1247,1249,1252,1254,1256,1258,1261,1263],{"class":436,"line":495},[434,1243,1244],{"class":516},"it",[434,1246,520],{"class":448},[434,1248,523],{"class":444},[434,1250,1251],{"class":467},"refunds the invoice and records an audit",[434,1253,523],{"class":444},[434,1255,452],{"class":444},[434,1257,952],{"class":942},[434,1259,1260],{"class":444}," ()",[434,1262,969],{"class":942},[434,1264,972],{"class":444},[434,1266,1267,1270,1273,1276,1278],{"class":436,"line":502},[434,1268,1269],{"class":942},"  const",[434,1271,1272],{"class":448}," captured",[434,1274,1275],{"class":444}," =",[434,1277,1225],{"class":516},[434,1279,1091],{"class":554},[434,1281,1282],{"class":436,"line":538},[434,1283,499],{"emptyLinePlaceholder":498},[434,1285,1286,1288,1291,1293,1295,1298,1300,1302,1305,1307,1310,1312,1315,1317,1319,1321,1323,1325,1328,1330,1332,1334,1336,1338,1341,1343,1345,1347],{"class":436,"line":607},[434,1287,977],{"class":440},[434,1289,1290],{"class":516}," refundInvoice",[434,1292,520],{"class":554},[434,1294,551],{"class":444},[434,1296,1297],{"class":554}," id",[434,1299,558],{"class":444},[434,1301,464],{"class":444},[434,1303,1304],{"class":467},"inv_889",[434,1306,523],{"class":444},[434,1308,1309],{"class":444}," },",[434,1311,445],{"class":444},[434,1313,1314],{"class":554}," actor",[434,1316,558],{"class":444},[434,1318,445],{"class":444},[434,1320,918],{"class":554},[434,1322,558],{"class":444},[434,1324,464],{"class":444},[434,1326,1327],{"class":467},"user",[434,1329,523],{"class":444},[434,1331,452],{"class":444},[434,1333,1297],{"class":554},[434,1335,558],{"class":444},[434,1337,464],{"class":444},[434,1339,1340],{"class":467},"u1",[434,1342,523],{"class":444},[434,1344,458],{"class":444},[434,1346,458],{"class":444},[434,1348,1349],{"class":554},")\n",[434,1351,1352],{"class":436,"line":625},[434,1353,499],{"emptyLinePlaceholder":498},[434,1355,1356,1359,1361,1364,1366,1369,1371,1373,1376,1378,1381],{"class":436,"line":1062},[434,1357,1358],{"class":516},"  expect",[434,1360,520],{"class":554},[434,1362,1363],{"class":448},"captured",[434,1365,508],{"class":444},[434,1367,1368],{"class":448},"events",[434,1370,581],{"class":554},[434,1372,508],{"class":444},[434,1374,1375],{"class":516},"toHaveLength",[434,1377,520],{"class":554},[434,1379,1380],{"class":575},"1",[434,1382,1349],{"class":554},[434,1384,1385,1387,1389,1391,1393,1396,1398],{"class":436,"line":1078},[434,1386,1358],{"class":516},[434,1388,520],{"class":554},[434,1390,1363],{"class":448},[434,1392,508],{"class":444},[434,1394,1395],{"class":516},"toIncludeAuditOf",[434,1397,520],{"class":554},[434,1399,1002],{"class":444},[434,1401,1402,1405,1407,1409,1412,1414],{"class":436,"line":1094},[434,1403,1404],{"class":554},"    action",[434,1406,558],{"class":444},[434,1408,464],{"class":444},[434,1410,1411],{"class":467},"invoice.refund",[434,1413,523],{"class":444},[434,1415,604],{"class":444},[434,1417,1418,1421,1423,1425,1427,1429,1431,1434,1436,1438,1440,1442,1444,1446,1448],{"class":436,"line":1100},[434,1419,1420],{"class":554},"    target",[434,1422,558],{"class":444},[434,1424,445],{"class":444},[434,1426,918],{"class":554},[434,1428,558],{"class":444},[434,1430,464],{"class":444},[434,1432,1433],{"class":467},"invoice",[434,1435,523],{"class":444},[434,1437,452],{"class":444},[434,1439,1297],{"class":554},[434,1441,558],{"class":444},[434,1443,464],{"class":444},[434,1445,1304],{"class":467},[434,1447,523],{"class":444},[434,1449,622],{"class":444},[434,1451,1452,1455,1457,1459,1462,1464],{"class":436,"line":1105},[434,1453,1454],{"class":554},"    outcome",[434,1456,558],{"class":444},[434,1458,464],{"class":444},[434,1460,1461],{"class":467},"success",[434,1463,523],{"class":444},[434,1465,604],{"class":444},[434,1467,1469,1471,1474,1476,1479,1481,1484],{"class":436,"line":1468},13,[434,1470,1081],{"class":444},[434,1472,1473],{"class":554},"))",[434,1475,508],{"class":444},[434,1477,1478],{"class":516},"toBe",[434,1480,520],{"class":554},[434,1482,1483],{"class":618},"true",[434,1485,1349],{"class":554},[434,1487,1489],{"class":436,"line":1488},14,[434,1490,499],{"emptyLinePlaceholder":498},[434,1492,1494,1497,1499,1502],{"class":436,"line":1493},15,[434,1495,1496],{"class":448},"  captured",[434,1498,508],{"class":444},[434,1500,1501],{"class":516},"restore",[434,1503,1091],{"class":554},[434,1505,1507,1509],{"class":436,"line":1506},16,[434,1508,823],{"class":444},[434,1510,1349],{"class":448},[399,1512,1513,1514,1517,1518,1521],{},"Always call ",[403,1515,1516],{},"captured.restore()"," in an ",[403,1519,1520],{},"afterEach"," (or wrap with a fixture) so a failing assertion never leaks into the next test.",[416,1523,1525],{"id":1524},"api-reference","API Reference",[1527,1528,1529,1545],"table",{},[1530,1531,1532],"thead",{},[1533,1534,1535,1539,1542],"tr",{},[1536,1537,1538],"th",{},"Symbol",[1536,1540,1541],{},"Kind",[1536,1543,1544],{},"Notes",[1546,1547,1548,1562,1575,1587,1604,1616,1629,1642,1658,1670,1683,1698,1710],"tbody",{},[1533,1549,1550,1556,1559],{},[1551,1552,1553],"td",{},[403,1554,1555],{},"AuditFields",[1551,1557,1558],{},"type",[1551,1560,1561],{},"Reserved field on the wide event",[1533,1563,1564,1569,1572],{},[1551,1565,1566],{},[403,1567,1568],{},"defineAuditAction(name, opts?)",[1551,1570,1571],{},"factory",[1551,1573,1574],{},"Typed action registry, infers target shape",[1533,1576,1577,1582,1584],{},[1551,1578,1579],{},[403,1580,1581],{},"defineAuditCatalog(prefix, map)",[1551,1583,1571],{},[1551,1585,1586],{},"Bundle of typed audit actions sharing a prefix",[1533,1588,1589,1594,1597],{},[1551,1590,1591],{},[403,1592,1593],{},"log.audit(fields)",[1551,1595,1596],{},"method",[1551,1598,1599,1600,1603],{},"Sugar over ",[403,1601,1602],{},"log.set({ audit })"," + force-keep",[1533,1605,1606,1611,1613],{},[1551,1607,1608],{},[403,1609,1610],{},"log.audit.deny(reason, fields)",[1551,1612,1596],{},[1551,1614,1615],{},"Records a denied action",[1533,1617,1618,1623,1626],{},[1551,1619,1620],{},[403,1621,1622],{},"audit(fields)",[1551,1624,1625],{},"function",[1551,1627,1628],{},"Standalone for scripts \u002F jobs",[1533,1630,1631,1636,1639],{},[1551,1632,1633],{},[403,1634,1635],{},"withAudit({ action, target })(fn)",[1551,1637,1638],{},"wrapper",[1551,1640,1641],{},"Auto-emit success \u002F failure \u002F denied",[1533,1643,1644,1649,1652],{},[1551,1645,1646],{},[403,1647,1648],{},"auditDiff(before, after)",[1551,1650,1651],{},"helper",[1551,1653,1654,1655],{},"Redact-aware JSON Patch for ",[403,1656,1657],{},"changes",[1533,1659,1660,1664,1667],{},[1551,1661,1662],{},[403,1663,1210],{},[1551,1665,1666],{},"test util",[1551,1668,1669],{},"Capture + assert audits in tests",[1533,1671,1672,1677,1680],{},[1551,1673,1674],{},[403,1675,1676],{},"auditEnricher(opts?)",[1551,1678,1679],{},"enricher",[1551,1681,1682],{},"Auto-fill request \u002F runtime \u002F tenant context",[1533,1684,1685,1690,1692],{},[1551,1686,1687],{},[403,1688,1689],{},"auditOnly(drain, { await? })",[1551,1691,1638],{},[1551,1693,1694,1695,1697],{},"Routes only events with an ",[403,1696,798],{}," field",[1533,1699,1700,1705,1707],{},[1551,1701,1702],{},[403,1703,1704],{},"signed(drain, opts)",[1551,1706,1638],{},[1551,1708,1709],{},"Generic integrity wrapper (hmac \u002F hash-chain)",[1533,1711,1712,1717,1720],{},[1551,1713,1714],{},[403,1715,1716],{},"auditRedactPreset",[1551,1718,1719],{},"config",[1551,1721,1722],{},"Strict PII for audit events",[399,1724,1725,1726,1728],{},"Everything ships from the main ",[403,1727,468],{}," entrypoint.",[1730,1731,1732],"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":430,"searchDepth":474,"depth":474,"links":1734},[1735,1736,1737,1738,1739],{"id":418,"depth":474,"text":419},{"id":660,"depth":474,"text":661},{"id":885,"depth":474,"text":886},{"id":1204,"depth":474,"text":1205},{"id":1524,"depth":474,"text":1525},"File system, Axiom, and Postgres recipes for audit logs, plus mockAudit for tests and the full API reference.","md",[1743,1746],{"label":152,"icon":129,"to":153,"color":1744,"variant":1745},"neutral","subtle",{"label":290,"icon":1747,"to":295,"color":1744,"variant":1745},"i-lucide-plug",{},{"title":156,"icon":64},{"title":394,"description":1740},"H3Qr_9083_axnLlOraNZDhtYetJLfzBabxjPxx7f9jA",[1753,1755],{"title":152,"path":153,"stem":154,"description":1754,"icon":129,"children":-1},"Integrity, redact presets, GDPR vs append-only, retention windows, and the most common pitfalls when shipping audit logs to production.",{"title":165,"path":166,"stem":167,"description":1756,"icon":168,"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.",1778106401939]