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