pub struct LoggerConfig {
pub enable_encryption: bool,
pub enable_compression: bool,
pub enable_redaction: bool,
pub correlation_id: Option<String>,
pub rate_limit_per_second: Option<u32>,
pub max_entry_size: usize,
pub retention_days: u32,
pub hash_algorithm: HashAlgorithm,
}Expand description
Logger configuration for v2.0 features
Fields§
§enable_encryption: bool§enable_compression: bool§enable_redaction: bool§correlation_id: Option<String>§rate_limit_per_second: Option<u32>§max_entry_size: usize§retention_days: u32§hash_algorithm: HashAlgorithmImplementations§
Source§impl LoggerConfig
impl LoggerConfig
Sourcepub fn with_encryption(self, enable: bool) -> Self
pub fn with_encryption(self, enable: bool) -> Self
Enable encryption for log entries
Sourcepub fn with_compression(self, enable: bool) -> Self
pub fn with_compression(self, enable: bool) -> Self
Enable compression for log entries
Sourcepub fn with_correlation_id(self, id: impl Into<String>) -> Self
pub fn with_correlation_id(self, id: impl Into<String>) -> Self
Set correlation ID for distributed tracing
Sourcepub fn with_rate_limit(self, limit: u32) -> Self
pub fn with_rate_limit(self, limit: u32) -> Self
Set rate limit (logs per second)
Sourcepub fn with_hash_algorithm(self, algorithm: HashAlgorithm) -> Self
pub fn with_hash_algorithm(self, algorithm: HashAlgorithm) -> Self
Set hash algorithm
Sourcepub fn with_redaction(self, enable: bool) -> Self
pub fn with_redaction(self, enable: bool) -> Self
Enable automatic PII redaction
Trait Implementations§
Source§impl Clone for LoggerConfig
impl Clone for LoggerConfig
Source§fn clone(&self) -> LoggerConfig
fn clone(&self) -> LoggerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoggerConfig
impl Debug for LoggerConfig
Auto Trait Implementations§
impl Freeze for LoggerConfig
impl RefUnwindSafe for LoggerConfig
impl Send for LoggerConfig
impl Sync for LoggerConfig
impl Unpin for LoggerConfig
impl UnwindSafe for LoggerConfig
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