Dns updater: Log DNS record types and values

This commit is contained in:
Maurus Decimus
2026-05-14 15:01:47 +02:00
parent cf1d4e9141
commit 51e227c5cc
2 changed files with 13 additions and 0 deletions

View File

@@ -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

View File

@@ -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())
}