mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[PR #1881] [MERGED] proto: clean up error logging #2674
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#2674
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/1881
Author: @hawkw
Created: 1/11/2023
Status: ✅ Merged
Merged: 1/17/2023
Merged by: @bluejekyll
Base:
main← Head:eliza/log-level-audit📝 Commits (5)
578aeefproto: always log stream closed errors atDEBUG9aff5a8proto: log DnsExchange io stream error atDEBUG142844eproto: log errors as structuredtracingfieldsd8bb323Update crates/proto/src/xfer/dns_exchange.rsedab55dUpdate crates/proto/src/xfer/dns_exchange.rs📊 Changes
3 files changed (+16 additions, -13 deletions)
View changed files
📝
crates/proto/src/error.rs(+4 -0)📝
crates/proto/src/xfer/dns_exchange.rs(+5 -2)📝
crates/proto/src/xfer/dns_multiplexer.rs(+7 -11)📄 Description
This branch changes some log messages in
trust-dns-protofrom theWARNlevel to theDEBUGlevel. In addition, while I was here, I also made a small change to improve how errors are recorded in thesetracingevents.This branch consists of the following commits:
proto: log errors as structured
tracingfieldsThis commit changes
trust-dns-prototo record errorsdyn Errortraitobjects in structured
tracingfields. This allows atracingsubscriber to choose to display richer representations of these errors,
such as recording their source chains, as they are recorded as a value
implementing the
Errortrait rather than an unstructuredfmt::Debug/fmt::Displayvalue.proto: log DnsExchange io stream error at
DEBUGCurrently, this error is logged at the
WARNlevel. However, the erroris returned in the future's output, so user code can determine whether
it should be logged at a higher verbosity level or hidden entirely.
Therefore, this commit changes the error to be logged at the
DEBUGlevel.
proto: always log stream closed errors at
DEBUGCurrently, the
DnsMultiplexerwill log stream closed errors atDEBUGif there are no active requests, or at
WARNif there are activerequests. This results in innocuous errors like a TCP stream closing
being logged as warnings in some cases.
Since the error is already propagated to all active requests when
closing them, user code can determine whether this should be logged at a
higher verbosity level or simply ignored. This commit changes the
stream_closed_close_allfunction to always log at theDEBUGlevel.Fixes #1880
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.