[−][src]Struct loggify::Loggify
The logger instance
To configure the logger, use the LogBuilder
struct
Implementations
impl Loggify
[src]
pub fn init() -> Result<(), SetLoggerError>
[src]
Creates a new logger using the default values
Defaults
level
-> The default level isInfo
exclude
-> No targets are excluded
Example
#[macro_use] extern crate log; extern crate loggify; use loggify::Loggify; fn main() { Loggify::init().unwrap(); error!("My error message"); warn!("My warn message"); info!("My info message"); debug!("Will not be shown"); trace!("Will not be shown"); }
pub fn init_with_level(level: Level) -> Result<(), SetLoggerError>
[src]
Same as init
but with log level
Example
#[macro_use] extern crate log; extern crate loggify; use loggify::Loggify; fn main() { Loggify::init_with_level(log::Level::Trace).unwrap(); error!("My error message"); warn!("My warn message"); info!("My info message"); debug!("My debug message"); trace!("My trace message"); }
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Loggify
impl Send for Loggify
impl Sync for Loggify
impl Unpin for Loggify
impl UnwindSafe for Loggify
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, 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>,