pub struct LogConfig {
pub level: Level,
pub console_output: bool,
pub console_format: LogFormat,
pub console_colors: bool,
pub console_show_target: bool,
pub console_show_file: bool,
pub console_show_line: bool,
pub file_output: bool,
pub log_file: Option<PathBuf>,
pub file_format: LogFormat,
pub rotation: LogRotationConfig,
}Expand description
日志配置
Fields§
§level: Level日志级别(用于应用模式的 EnvFilter 默认 directive)
console_output: bool是否启用控制台输出
console_format: LogFormat控制台输出格式
console_colors: bool控制台是否启用颜色
console_show_target: bool控制台是否显示 target
console_show_file: bool控制台是否显示文件
console_show_line: bool控制台是否显示行号
file_output: bool是否启用文件输出
log_file: Option<PathBuf>日志文件路径(目录 + 文件名基准;实际会由 appender 生成带日期/小时的文件)
file_format: LogFormat文件输出格式
rotation: LogRotationConfig日志轮转配置
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogConfig
impl RefUnwindSafe for LogConfig
impl Send for LogConfig
impl Sync for LogConfig
impl Unpin 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