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