diff --git a/CHANGELOG.md b/CHANGELOG.md index a244899e..6b6cdf3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file. This projec If you are upgrading from v0.16.x, replace the binary (or run `docker pull`). If you are upgrading from v0.15.x and below, please read the [upgrading documentation](https://github.com/stalwartlabs/stalwart/blob/main/UPGRADING/v0_16.md) for more information on how to upgrade from previous versions. ## Added +- Dns updater: Log DNS record types and values. ## Changed diff --git a/crates/common/src/network/dns/update.rs b/crates/common/src/network/dns/update.rs index 74e808cb..6e896167 100644 --- a/crates/common/src/network/dns/update.rs +++ b/crates/common/src/network/dns/update.rs @@ -274,6 +274,7 @@ impl DnsUpdater { Hostname = name.to_string(), Reason = err.to_string(), Details = origin.to_string(), + Type = record.as_type().as_str(), ); } @@ -290,6 +291,8 @@ impl DnsUpdater { Dns(DnsEvent::RecordCreated), Hostname = name.to_string(), Details = origin.to_string(), + Type = record.as_type().as_str(), + Value = format!("{:?}", record), ); if verify && let DnsRecord::TXT(txt_record) = &record { @@ -320,6 +323,8 @@ impl DnsUpdater { Hostname = name.to_string(), Details = origin.to_string(), Result = result.to_string(), + Type = record.as_type().as_str(), + Value = format!("{:?}", record), ); } } @@ -329,6 +334,8 @@ impl DnsUpdater { Hostname = name.to_string(), Details = origin.to_string(), Reason = err.to_string(), + Type = record.as_type().as_str(), + Value = format!("{:?}", record), ); } } @@ -341,12 +348,16 @@ impl DnsUpdater { Dns(DnsEvent::RecordPropagated), Hostname = name.to_string(), Details = origin.to_string(), + Type = record.as_type().as_str(), + Value = format!("{:?}", record), ); } else { trc::event!( Dns(DnsEvent::RecordPropagationTimeout), Hostname = name.to_string(), Details = origin.to_string(), + Type = record.as_type().as_str(), + Value = format!("{:?}", record), ); } @@ -371,6 +382,7 @@ impl DnsUpdater { Hostname = name.to_string(), Reason = err.to_string(), Details = origin.to_string(), + Type = record_type.as_str(), ); Err(err.to_string()) }