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