pub struct StdErrLog { /* private fields */ }
Expand description
Data specific to this logger
Implementations
sourceimpl StdErrLog
impl StdErrLog
sourcepub fn verbosity<V: Into<LogLevelNum>>(
&mut self,
verbosity: V
) -> &mut StdErrLog
pub fn verbosity<V: Into<LogLevelNum>>(
&mut self,
verbosity: V
) -> &mut StdErrLog
Sets the verbosity level of messages that will be displayed
Values can be supplied as:
- usize
- log::Level
- log::LevelFilter
- LogLevelNum
Values map as follows: 0 -> Error 1 -> Warn 2 -> Info 3 -> Debug 4 or higher -> Trace
sourcepub fn quiet(&mut self, quiet: bool) -> &mut StdErrLog
pub fn quiet(&mut self, quiet: bool) -> &mut StdErrLog
silence all output, no matter the value of verbosity
sourcepub fn show_level(&mut self, levels: bool) -> &mut StdErrLog
pub fn show_level(&mut self, levels: bool) -> &mut StdErrLog
Enables or disables the use of levels in log messages (default is true)
sourcepub fn timestamp(&mut self, timestamp: Timestamp) -> &mut StdErrLog
pub fn timestamp(&mut self, timestamp: Timestamp) -> &mut StdErrLog
Enables or disables the use of timestamps in log messages
sourcepub fn color(&mut self, choice: ColorChoice) -> &mut StdErrLog
pub fn color(&mut self, choice: ColorChoice) -> &mut StdErrLog
Enables or disables the use of color in log messages
sourcepub fn module<T: Into<String>>(&mut self, module: T) -> &mut StdErrLog
pub fn module<T: Into<String>>(&mut self, module: T) -> &mut StdErrLog
specify a module to allow to log to stderr
sourcepub fn show_module_names(&mut self, show_module_names: bool) -> &mut StdErrLog
pub fn show_module_names(&mut self, show_module_names: bool) -> &mut StdErrLog
Enables or disables the use of module names in log messages
sourcepub fn modules<T: Into<String>, I: IntoIterator<Item = T>>(
&mut self,
modules: I
) -> &mut StdErrLog
pub fn modules<T: Into<String>, I: IntoIterator<Item = T>>(
&mut self,
modules: I
) -> &mut StdErrLog
specifiy modules to allow to log to stderr
sourcepub fn init(&mut self) -> Result<(), SetLoggerError>
pub fn init(&mut self) -> Result<(), SetLoggerError>
sets the the logger as active
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for StdErrLog
impl Send for StdErrLog
impl Sync for StdErrLog
impl Unpin for StdErrLog
impl UnwindSafe for StdErrLog
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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