pub struct LoggerConfig {
pub level: LogLevel,
pub dir: PathBuf,
pub filename: String,
pub rolling_policy: RollingPolicy,
pub format: LogFormat,
pub async_write: bool,
pub split_by_level: bool,
pub console: Option<ConsoleConfig>,
}
Expand description
日志配置
Fields§
§level: LogLevel
日志级别
dir: PathBuf
日志目录
filename: String
日志文件名
rolling_policy: RollingPolicy
滚动策略
format: LogFormat
日志格式
async_write: bool
是否异步写入
split_by_level: bool
是否按级别分离文件
console: Option<ConsoleConfig>
控制台输出配置
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
Source§impl Default for LoggerConfig
impl Default for LoggerConfig
Source§impl<'de> Deserialize<'de> for LoggerConfig
impl<'de> Deserialize<'de> for LoggerConfig
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 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