pub struct AuditConfig {
pub path: PathBuf,
pub max_bytes: u64,
pub snapshot_dir: Option<PathBuf>,
pub snapshot_max_bytes: usize,
pub snapshots_per_day: u32,
pub redact: bool,
pub source: String,
}Expand description
审计日志配置。
Fields§
§path: PathBufJSON Lines 日志文件。
max_bytes: u64当前日志文件超过这个大小就轮转。
snapshot_dir: Option<PathBuf>结果可疑时保存 HTML 快照的目录;None 表示不存快照。
snapshot_max_bytes: usize单个快照最多保存多少字节,超出部分截掉。
snapshots_per_day: u32每天最多保存多少个快照。
redact: boolURL 里的凭证是否脱敏。
source: String运行方式(serve、mcp-http、scrape……),写进每条记录。
Implementations§
Source§impl AuditConfig
impl AuditConfig
pub fn new(path: impl Into<PathBuf>) -> AuditConfig
Trait Implementations§
Source§impl Clone for AuditConfig
impl Clone for AuditConfig
Source§fn clone(&self) -> AuditConfig
fn clone(&self) -> AuditConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuditConfig
impl RefUnwindSafe for AuditConfig
impl Send for AuditConfig
impl Sync for AuditConfig
impl Unpin for AuditConfig
impl UnsafeUnpin for AuditConfig
impl UnwindSafe for AuditConfig
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