pub struct AuditLogger { /* private fields */ }
Expand description
Main audit logger with multiple sinks
Implementations§
Source§impl AuditLogger
impl AuditLogger
Sourcepub fn set_enabled(self, enabled: bool) -> Self
pub fn set_enabled(self, enabled: bool) -> Self
Enable or disable audit logging
Sourcepub fn log_event(&self, event: AuditEvent)
pub fn log_event(&self, event: AuditEvent)
Log an audit event to all configured sinks
Sourcepub fn log_access(&self, key: &str, user_context: Option<&str>)
pub fn log_access(&self, key: &str, user_context: Option<&str>)
Log a configuration access event
Sourcepub fn log_modification(
&self,
key: &str,
old_value: Option<&Value>,
new_value: &Value,
user_context: Option<&str>,
)
pub fn log_modification( &self, key: &str, old_value: Option<&Value>, new_value: &Value, user_context: Option<&str>, )
Log a configuration modification event
Sourcepub fn log_validation_failure(
&self,
key: &str,
error: &str,
value: &Value,
user_context: Option<&str>,
)
pub fn log_validation_failure( &self, key: &str, error: &str, value: &Value, user_context: Option<&str>, )
Log a validation failure event
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuditLogger
impl !RefUnwindSafe for AuditLogger
impl Send for AuditLogger
impl Sync for AuditLogger
impl Unpin for AuditLogger
impl !UnwindSafe for AuditLogger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more