pub struct AuditLog { /* private fields */ }Expand description
Append-only JSON Lines audit log. One file handle, serialised by a
Mutex so concurrent writes from future multi-threaded clients stay
atomic on POSIX. Each entry records timestamp, tool name, sanitised
arguments, and outcome.
Implementations§
Source§impl AuditLog
impl AuditLog
pub fn open(path: &Path) -> Result<Self>
Sourcepub fn record(&self, tool: &str, args: &Value, outcome: AuditOutcome)
pub fn record(&self, tool: &str, args: &Value, outcome: AuditOutcome)
Append one audit entry. Failures are logged but never propagated: audit-log write errors must not break the JSON-RPC response loop. Args are redacted before logging so shell command bodies and other fields that may carry secrets are not persisted.
Auto Trait Implementations§
impl !Freeze for AuditLog
impl RefUnwindSafe for AuditLog
impl Send for AuditLog
impl Sync for AuditLog
impl Unpin for AuditLog
impl UnsafeUnpin for AuditLog
impl UnwindSafe for AuditLog
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more