pub struct FileLogConfig {
pub directory: String,
pub filename: String,
pub format: String,
pub size_limit_mb: u64,
pub count_limit: u32,
pub rotation: String,
}Expand description
文件日志配置
Fields§
§directory: String日志目录(例如:./logs)。默认 ./logs
filename: String日志文件名前缀(例如:app,最终文件名会是 app.log)
format: String日志输出格式:plain 或 json
size_limit_mb: u64单个日志文件大小限制(MB)。0 表示不限制。默认 100MB
count_limit: u32保留的最大日志文件数量。0 表示不限制。默认 10 个
rotation: String滚动策略:daily(按天) 或 size(按大小)。默认 daily
Trait Implementations§
Source§impl Clone for FileLogConfig
impl Clone for FileLogConfig
Source§fn clone(&self) -> FileLogConfig
fn clone(&self) -> FileLogConfig
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 FileLogConfig
impl Debug for FileLogConfig
Source§impl<'de> Deserialize<'de> for FileLogConfig
impl<'de> Deserialize<'de> for FileLogConfig
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
Auto Trait Implementations§
impl Freeze for FileLogConfig
impl RefUnwindSafe for FileLogConfig
impl Send for FileLogConfig
impl Sync for FileLogConfig
impl Unpin for FileLogConfig
impl UnsafeUnpin for FileLogConfig
impl UnwindSafe for FileLogConfig
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