pub struct LogConfig {
pub driver: LogDriver,
pub options: HashMap<String, String>,
}Expand description
Logging configuration for a box.
Fields§
§driver: LogDriver§options: HashMap<String, String>Implementations§
Source§impl LogConfig
impl LogConfig
Sourcepub fn max_size(&self) -> u64
pub fn max_size(&self) -> u64
Maximum log file size in bytes before rotation.
Default: 10 MiB. Set via max-size option (e.g., “10m”, “1g”).
Sourcepub fn max_file(&self) -> u32
pub fn max_file(&self) -> u32
Maximum number of rotated log files to keep.
Default: 3. Set via max-file option.
Sourcepub fn syslog_address(&self) -> &str
pub fn syslog_address(&self) -> &str
Syslog address (e.g., “udp://localhost:514”).
Only relevant when driver is Syslog.
Sourcepub fn syslog_facility(&self) -> &str
pub fn syslog_facility(&self) -> &str
Syslog facility (e.g., “daemon”, “local0”).
Only relevant when driver is Syslog.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogConfig
impl<'de> Deserialize<'de> for LogConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LogConfig
impl StructuralPartialEq for LogConfig
Auto Trait Implementations§
impl Freeze for LogConfig
impl RefUnwindSafe for LogConfig
impl Send for LogConfig
impl Sync for LogConfig
impl Unpin for LogConfig
impl UnsafeUnpin for LogConfig
impl UnwindSafe for LogConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.