Skip to content

Commit

Permalink
Downgrade DNS info! to debug! (#1454)
Browse files Browse the repository at this point in the history
* Downgrade DNS info! to debug!

* Update resolver.rs
  • Loading branch information
passcod authored Oct 10, 2023
1 parent e47b908 commit 3cf76cd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions crates/binstalk-downloader/src/remote/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ use std::{net::SocketAddr, sync::Arc};
use hyper::client::connect::dns::Name;
use once_cell::sync::OnceCell;
use reqwest::dns::{Addrs, Resolve};
use tracing::{info, instrument, warn};
use tracing::{debug, instrument, warn};
use trust_dns_resolver::TokioAsyncResolver;

#[cfg(windows)]
use tracing::{debug, trace};
#[cfg(windows)]
use trust_dns_resolver::config::{NameServerConfig, Protocol, ResolverConfig, ResolverOpts};

Expand All @@ -33,17 +31,17 @@ impl Resolve for TrustDnsResolver {
fn new_resolver() -> Result<TokioAsyncResolver, BoxError> {
#[cfg(unix)]
{
info!("Using system DNS resolver configuration");
debug!("Using system DNS resolver configuration");
Ok(TokioAsyncResolver::tokio_from_system_conf()?)
}
#[cfg(windows)]
{
info!("Using custom DNS resolver configuration");
debug!("Using custom DNS resolver configuration");
let mut config = ResolverConfig::new();
let opts = ResolverOpts::default();

get_adapter()?.dns_servers().iter().for_each(|addr| {
trace!("Adding DNS server: {}", addr);
tracing::trace!("Adding DNS server: {}", addr);
let socket_addr = SocketAddr::new(*addr, 53);
for protocol in [Protocol::Udp, Protocol::Tcp] {
config.add_name_server(NameServerConfig {
Expand Down

0 comments on commit 3cf76cd

Please sign in to comment.