Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Logging

dns-rs logs through tracing to standard output. RUST_LOG sets the filter and defaults to info.

Query log

Each answered query produces one INFO line under the target dns_rs::query, with these fields:

FieldValue
clientClient IP address
nameQueried name, with the trailing dot
typeRecord type, for example A
rcodeNOERROR, FORMERR, SERVFAIL, NXDOMAIN, NOTIMP, REFUSED, or RCODE<n>
sourcecache, upstream, blocked, local (a local record), forwarded (answered by a forward server), rejected (FORMERR or NOTIMP) or failed (upstream or forward server could not answer, SERVFAIL)
duration_usTime to answer, in microseconds

Turn it off without silencing the rest: RUST_LOG=info,dns_rs::query=off.

Operational messages

LevelMessageMeaning
infodns-rs startedListening; shows listen, http_listen and upstream
infoblocking policy loadedA policy is in force; shows the rule count and mode
infolocal records loadedAt startup and when [local] changed; names is the number of local names
infoforwarded domains loadedAt startup and when [[forward]] changed; domains is the number of forwarded domains
infoblocklist loadedPer list: deny, allow and skipped counts
warncannot load blocklist, skippedA list failed; the cause is in error
warnkeeping the previous version of the blocklistA refresh failed, the old content stays
warnblocklist fetched over plain HTTP, prefer HTTPSAn http:// list
inforeload requestedSIGHUP received
inforefreshing blocklistsThe blocking.refresh schedule fired
infoconfiguration reloadedA changed configuration was applied
warnconfiguration changes need a restart to applyLists the restart-only settings that changed
errorconfiguration rejected, keeping the previous oneInvalid or unreadable file
warnupstream query failedThe client receives SERVFAIL
infoshutting downCtrl-C or SIGTERM received

Malformed queries and connection errors are logged at debug.