Skip to content

Commit

Permalink
chore: move start logging for dns listener (#206)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <[email protected]>
  • Loading branch information
wolf31o2 authored Sep 8, 2024
1 parent 58af70c commit dcd6e3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 0 additions & 7 deletions cmd/cdnsd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
6 changes: 6 additions & 0 deletions internal/dns/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dcd6e3a

Please sign in to comment.