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