pub struct Writer { /* private fields */ }Expand description
A writer for buffering the log and writing them into the suitable files.
Implementations§
source§impl Writer
impl Writer
sourcepub fn new(
dir_path: &str,
single_length: usize,
file_record: Option<LogLevel>,
terminal_print: Option<LogLevel>,
time_zone: i32,
time_details: bool,
print_out: bool
) -> Writer
pub fn new( dir_path: &str, single_length: usize, file_record: Option<LogLevel>, terminal_print: Option<LogLevel>, time_zone: i32, time_details: bool, print_out: bool ) -> Writer
Customize and initialize the log writer.
pub fn clear_dir(&mut self)
sourcepub fn write_all(&mut self)
pub fn write_all(&mut self)
Write all the logs in the buffer into the files. and also clear the buffer.
Auto Trait Implementations§
impl Freeze for Writer
impl RefUnwindSafe for Writer
impl Send for Writer
impl Sync for Writer
impl Unpin for Writer
impl UnwindSafe for Writer
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