Struct loggify::LogBuilder [] [src]

pub struct LogBuilder { /* fields omitted */ }

Struct for building a new logger

Methods

impl LogBuilder
[src]

[src]

Creates a new instance of the LogBuilder

Defaults

  • level -> The default level is Info
  • exclude -> No targets are excluded

Example

#[macro_use]
   extern crate log;
   extern crate loggify;

   use loggify::LogBuilder;

   fn main() {
       LogBuilder::new()
           .set_level(log::Level::Trace)
           .add_exclude("exclude::exclude_example".to_string())
           .build()
           .unwrap();

       error!("My error message");
       warn!("My warn message");
       info!("My info message");
       debug!("My debug message");
       trace!("My trace message");
   }

[src]

Adds a new target to exclude from logging

See the example exclude for usage

[src]

Sets the minimum level

[src]

Creates a new logger

Trait Implementations

Auto Trait Implementations

impl Send for LogBuilder

impl Sync for LogBuilder