Struct logs::LogConfig [−][src]
pub struct LogConfig { /* fields omitted */ }
Expand description
Configuration Log
Implementations
impl LogConfig
[src]
impl LogConfig
[src]pub const fn enable_all() -> Self
[src]
pub const fn enable_all() -> Self
[src]Enable all log output
pub const fn disable_all() -> Self
[src]
pub const fn disable_all() -> Self
[src]Disable all log output
pub fn from_env_name<S: AsRef<str>>(name: S) -> Result<Self, LogError>
[src]
pub fn from_env_name<S: AsRef<str>>(name: S) -> Result<Self, LogError>
[src]Create configuration from the specified environment variables
pub fn get_color(&self) -> bool
[src]
pub fn get_trace(&self) -> bool
[src]
pub fn get_debug(&self) -> bool
[src]
pub fn get_info(&self) -> bool
[src]
pub fn get_warn(&self) -> bool
[src]
pub fn get_error(&self) -> bool
[src]
pub fn date_format<S: AsRef<str>>(
&mut self,
format: S
) -> Result<&mut Self, ParseError>
[src]
pub fn date_format<S: AsRef<str>>(
&mut self,
format: S
) -> Result<&mut Self, ParseError>
[src]Set the log date and time format
format: time docs
logs::LogConfig::enable_all().date_format("%c").unwrap().apply(); // [Fri Nov 27 13:51:59 2020] [ERROR] This is a error log
pub fn get_date_format(&self) -> &'static str
[src]
Trait Implementations
impl Copy for LogConfig
[src]
Auto Trait Implementations
impl RefUnwindSafe for LogConfig
impl Send for LogConfig
impl Sync for LogConfig
impl Unpin for LogConfig
impl UnwindSafe for LogConfig
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more