pub struct ELogger { /* private fields */ }
Implementations§
Source§impl ELogger
you should have done all of initialization setup before calling init();
impl ELogger
you should have done all of initialization setup before calling init();
pub fn new() -> Self
pub fn new_dest(dest: &str) -> Self
Sourcepub fn set_max_level(self, l: Level) -> Self
pub fn set_max_level(self, l: Level) -> Self
set the max Level, you can also use log::set_max_level but you can only get the max filter level by call log::max_level you can only input [“ERROR”, “WARN”, “INFO”, “DEBUG”, “TRACE”] case maybe I can cover more one layer upon the log::log! ? it’s only the old impl, at that time, I want to implement a completely isolation.
Sourcepub fn set_time_format(self, format: &str) -> Self
pub fn set_time_format(self, format: &str) -> Self
use your custom format to log the time you can link to time crate https://crates.io/crates/time getting the introduction of time format
Sourcepub fn set_use_local(self, is_use: bool) -> Self
pub fn set_use_local(self, is_use: bool) -> Self
a switch for controlling your log time standard
Sourcepub fn set_log_time(self, is_open: bool) -> Self
pub fn set_log_time(self, is_open: bool) -> Self
control whether log the time
Sourcepub fn enable_use_color(self) -> Self
pub fn enable_use_color(self) -> Self
enabled to use color format
Sourcepub fn disable_use_color(self) -> Self
pub fn disable_use_color(self) -> Self
disable to use color format
Sourcepub fn is_use_color(&self) -> bool
pub fn is_use_color(&self) -> bool
check use_color
Sourcepub fn is_use_dest(&self) -> bool
pub fn is_use_dest(&self) -> bool
destination
Sourcepub fn push_output(&self, stream: &str)
pub fn push_output(&self, stream: &str)
push stream into
Sourcepub fn set_use_dest(self, is_open: bool) -> Self
pub fn set_use_dest(self, is_open: bool) -> Self
control whether use the
pub fn init(self) -> Result<(), SetLoggerError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ELogger
impl RefUnwindSafe for ELogger
impl Send for ELogger
impl Sync for ELogger
impl Unpin for ELogger
impl UnwindSafe for ELogger
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