net/dns{,/resolver}: quiet DNS output logging

It was a huge chunk of the overall log output and made debugging
difficult. Omit and summarize the spammy *.arpa parts instead.

Fixes tailscale/corp#2066 (to which nobody had opinions, so)
This commit is contained in:
Brad Fitzpatrick
2021-07-19 22:24:43 -07:00
parent b6d70203d3
commit e74d37d30f
3 changed files with 94 additions and 2 deletions

View File

@@ -5,6 +5,7 @@
package dns
import (
"bufio"
"runtime"
"time"
@@ -50,14 +51,18 @@ func NewManager(logf logger.Logf, oscfg OSConfigurator, linkMon *monitor.Mon, li
}
func (m *Manager) Set(cfg Config) error {
m.logf("Set: %+v", cfg)
m.logf("Set: %v", logger.ArgWriter(func(w *bufio.Writer) {
cfg.WriteToBufioWriter(w)
}))
rcfg, ocfg, err := m.compileConfig(cfg)
if err != nil {
return err
}
m.logf("Resolvercfg: %+v", rcfg)
m.logf("Resolvercfg: %v", logger.ArgWriter(func(w *bufio.Writer) {
rcfg.WriteToBufioWriter(w)
}))
m.logf("OScfg: %+v", ocfg)
if err := m.resolver.SetConfig(rcfg); err != nil {