[−][src]Struct mod_logger::Logger
The Logger struct holds a singleton containing all relevant information.
struct Logger has a private constructor. It is used via its static interface which will instantiate a Logger or use an existing one.
Implementations
impl<'a> Logger
[src]
pub fn flush()
[src]
Flush the contents of log buffers
pub fn create()
[src]
create a default logger
pub fn set_default_level(log_level: Level)
[src]
Initialise a Logger with the given default log_level or modify the default log level of the existing logger
pub fn get_default_level(&self) -> Level
[src]
Retrieve the default level of the logger
pub fn set_mod_level(module: &str, log_level: Level)
[src]
Modify the log level for a module
pub fn get_buffer() -> Option<Vec<u8>>
[src]
Retrieve the current log buffer, if available
pub fn set_log_dest<S: 'static + Write + Send>(
dest: &LogDestination,
stream: Option<S>
) -> Result<(), Error>
[src]
dest: &LogDestination,
stream: Option<S>
) -> Result<(), Error>
Set the log destination
pub fn set_log_file(
log_dest: &LogDestination,
log_file: &Path,
buffered: bool
) -> Result<(), Error>
[src]
log_dest: &LogDestination,
log_file: &Path,
buffered: bool
) -> Result<(), Error>
Set log destination and log file.
pub fn get_log_dest() -> LogDestination
[src]
Retrieve the current log destination
pub fn set_log_config(log_config: &LogConfig) -> Result<(), Error>
[src]
Set the log configuration.
pub fn set_color(color: bool)
[src]
Enable / disable colored output
pub fn set_timestamp(val: bool)
[src]
Enable / disable timestamp in messages
pub fn set_brief_info(val: bool)
[src]
Enable / disable brief info messages
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnwindSafe for Logger
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,