Expand description
phoxia-auditlog — Automatic audit logging for Axum apps.
§Quick start
use phoxia_auditlog::{AuditLayer, AuditConfig};
use sqlx::PgPool;
let pool = PgPool::connect("postgres://...").await?;
let config = AuditConfig::new(pool, "my-service");
let (layer, _ctx) = AuditLayer::new(config);
// Add `layer` to your Axum router with `.layer(layer)`Re-exports§
pub use auditable::Auditable;pub use config::AuditConfig;pub use context::AuditContext;pub use event::AuditEvent;pub use layer::AuditLayer;pub use chrono;pub use serde_json;
Modules§
Macros§
- audit
- Log an explicit audit event from a handler.
- audit_
diff - Log an audit event with before/after diff of a mutated value.