Skip to content

Commit

Permalink
Downgrade DNS errors to warnings (#17)
Browse files Browse the repository at this point in the history
* Downgrade DNS errors to warnings

* Changelog
  • Loading branch information
nightkr authored Dec 16, 2024
1 parent a7f9d9b commit 9875895
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ All notable changes to this project will be documented in this file.

### Changed

- Downgraded DNS errors to warnings ([#17]).
- All output is now wrapped in a "containerdebug" span ([#18]).

[#17]: https://github.com/stackabletech/containerdebug/pull/17
[#18]: https://github.com/stackabletech/containerdebug/pull/18

## [0.1.0] - 2024-12-09
Expand Down
12 changes: 6 additions & 6 deletions src/system_information/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ impl SystemNetworkInfo {
.into_iter()
.map(|ptr_record| ptr_record.to_utf8())
.collect();
tracing::info!(%ip, ?hostnames, "performed reverse lookup for IP");
tracing::info!(%ip, ?hostnames, "performed reverse DNS lookup for IP");
Some((ip, hostnames))
}
Err(error) => {
tracing::error!(
tracing::warn!(
%ip,
error = &error as &dyn std::error::Error,
"reverse lookup failed"
"reverse DNS lookup failed"
);
None
}
Expand All @@ -89,14 +89,14 @@ impl SystemNetworkInfo {
.filter_map(|hostname| match resolver.lookup_ip(hostname.clone()) {
Ok(result) => {
let ips = result.iter().collect();
tracing::info!(hostname, ?ips, "performed forward lookup for hostname");
tracing::info!(hostname, ?ips, "performed forward DNS lookup for hostname");
Some((hostname, ips))
}
Err(error) => {
tracing::error!(
tracing::warn!(
hostname,
error = &error as &dyn std::error::Error,
"forward lookup failed"
"forward DNS lookup failed"
);
None
}
Expand Down

0 comments on commit 9875895

Please sign in to comment.