-
Couldn't load subscription status.
- Fork 97
Dawid Ciężarkiewicz edited this page Aug 3, 2016
·
19 revisions
Yes. See slog-stdlog crate and slog oldlogging examples
#[macro_use]
extern crate log;
extern crate slog_stdlog;
fn main() {
slog_stdlog::init().unwrap();
// Note: this `info!(...)` macro comes from `log` crate
info!("standard logging redirected to slog");
}If you start a new project, you should just use slog and not log.
If you're just trying out slog in existing project, you can use slog-stdlog and keep using log crate macros. During transition period to slog, you can use alternative names of slog macros. See slog alternative names example
Generally if you decided to use slog you should transition