diff options
author | Alex Auvolat <alex@adnab.me> | 2022-12-11 15:46:48 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-12-11 15:46:48 +0100 |
commit | 0d37299b24ec112b752b81334e35bac8c2c36167 (patch) | |
tree | b659a78c127f0f894ce5cd1d804931c46c8ec468 /src/dns_updater.rs | |
parent | 2d765994f3ff1981ebae47dc2058f72b59e52f4f (diff) | |
download | D53-0d37299b24ec112b752b81334e35bac8c2c36167.tar.gz D53-0d37299b24ec112b752b81334e35bac8c2c36167.zip |
replace pretty_env_logger by tracing_subscriber
Diffstat (limited to 'src/dns_updater.rs')
-rw-r--r-- | src/dns_updater.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dns_updater.rs b/src/dns_updater.rs index 06ba408..d781671 100644 --- a/src/dns_updater.rs +++ b/src/dns_updater.rs @@ -1,10 +1,11 @@ use std::net::{Ipv4Addr, Ipv6Addr}; use std::sync::Arc; +use std::time::Duration; use anyhow::{anyhow, bail, Result}; -use log::*; use tokio::select; use tokio::sync::watch; +use tracing::*; use crate::dns_config::*; use crate::provider::DnsProvider; @@ -15,6 +16,10 @@ pub async fn dns_updater_task( allowed_domains: Vec<String>, mut must_exit: watch::Receiver<bool>, ) { + info!("DNS updater will start in 5 seconds"); + tokio::time::sleep(Duration::from_secs(5)).await; + info!("DNS updater starting"); + let mut config = Arc::new(DnsConfig::new()); while !*must_exit.borrow() { select!( |