mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 19:25:56 +03:00
[GH-ISSUE #2445] Replace commented-out env_logger lines with tracing_subscriber registration #994
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#994
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?
Originally created by @divergentdave on GitHub (Sep 9, 2024).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2445
There are a number of tests throughout the codebase that have commented-out
env_loggerinitializations. However, neitherenv_loggernorlogare in use anymore. These could be replaced with calls to a function like that below, in order to make debugging test failures simpler to get started with.The
std::sync::Oncemakes this safe to use from multiple integration tests/unit tests at once, and.with_test_writer()redirects output through the standard library's macros, instead of bare file descriptors, so that the test harness can still capture log output.With the current crate structure, this would have to be copied and pasted in a large number of places. #2444 would help cut that number down to one or two copies per crate. (one in src/lib.rs, and one in the sole integration test target's root module) Alternately, this function could be placed in a new crate that is added to the dev-dependencies of every crate that needs it.
@djc commented on GitHub (Sep 10, 2024):
Sounds good -- agreed that it would be better to merge more of the integration test stack.