pub struct Config {
pub appends: Vec<Box<dyn LogAppender>>,
pub level: LevelFilter,
pub filter: Box<dyn Filter>,
pub format: Box<dyn RecordFormat>,
pub chan_len: Option<usize>,
}
Fields
appends: Vec<Box<dyn LogAppender>>
level: LevelFilter
filter: Box<dyn Filter>
format: Box<dyn RecordFormat>
chan_len: Option<usize>
Implementations
sourceimpl Config
impl Config
pub fn new() -> Self
sourcepub fn level(self, level: LevelFilter) -> Self
pub fn level(self, level: LevelFilter) -> Self
set log LevelFilter
sourcepub fn format<F: RecordFormat + 'static>(self, format: F) -> Self
pub fn format<F: RecordFormat + 'static>(self, format: F) -> Self
set log format
sourcepub fn file_split<P: Packer + 'static>(
self,
file_path: &str,
max_temp_size: LogSize,
rolling_type: RollingType,
packer: P
) -> Self
pub fn file_split<P: Packer + 'static>(
self,
file_path: &str,
max_temp_size: LogSize,
rolling_type: RollingType,
packer: P
) -> Self
add a FileSplitAppender
sourcepub fn custom<Appender: LogAppender + 'static>(self, arg: Appender) -> Self
pub fn custom<Appender: LogAppender + 'static>(self, arg: Appender) -> Self
add a custom LogAppender
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Config
impl Send for Config
impl !Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more