Crate multi_log [] [src]

Provides a MultiLogger that allows for logging to any number of loggers that have the log::Log trait.

This enables log messages to be sent to multiple loggers from a single log macro (debug!, info!, etc.).


extern crate log;
extern crate env_logger;
extern crate simplelog;
extern crate multi_log;

let logger_a = Box::new(env_logger::Builder::from_default_env().build());
let logger_b = simplelog::SimpleLogger::new(log::LevelFilter::Warn, simplelog::Config::default());
multi_log::MultiLogger::init(vec![logger_a, logger_b], log::Level::Info);



Logger that writes log messages to all the loggers it encapsulates.