diff --git a/cmd/cdnsd/main.go b/cmd/cdnsd/main.go index caec5ef..a7a8705 100644 --- a/cmd/cdnsd/main.go +++ b/cmd/cdnsd/main.go @@ -136,13 +136,6 @@ func main() { } // Start DNS listener - slog.Info( - fmt.Sprintf( - "starting DNS listener on %s:%d", - cfg.Dns.ListenAddress, - cfg.Dns.ListenPort, - ), - ) if err := dns.Start(); err != nil { slog.Error( fmt.Sprintf("failed to start DNS listener: %s", err), diff --git a/internal/dns/dns.go b/internal/dns/dns.go index 9ec18fc..adc814b 100644 --- a/internal/dns/dns.go +++ b/internal/dns/dns.go @@ -36,6 +36,12 @@ func Start() error { cfg.Dns.ListenAddress, cfg.Dns.ListenPort, ) + slog.Info( + fmt.Sprintf( + "starting DNS listener on %s", + listenAddr, + ), + ) // Setup handler dns.HandleFunc(".", handleQuery) // UDP listener