aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index a55f271..667c058 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,9 +1,9 @@
use std::sync::Arc;
-use log::*;
use structopt::StructOpt;
use tokio::select;
use tokio::sync::watch;
+use tracing::*;
mod dns_config;
mod dns_updater;
@@ -54,7 +54,10 @@ async fn main() {
if std::env::var("RUST_LOG").is_err() {
std::env::set_var("RUST_LOG", "tricot=info")
}
- pretty_env_logger::init();
+ tracing_subscriber::fmt()
+ .with_writer(std::io::stderr)
+ .with_env_filter(tracing_subscriber::filter::EnvFilter::from_default_env())
+ .init();
// Abort on panic (same behavior as in Go)
std::panic::set_hook(Box::new(|panic_info| {