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