Skip to content

Commit

Permalink
Update mdns.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Feb 6, 2024
1 parent 7c8f410 commit 3e2bca2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions wap/cmd/mdns/mdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ func LoadConfig() error {
HardwareID: hardwareID,
}

log.Infow("mdns info loaded from config file", "infoSlice", infoSlice)

globalConfig = &infoSlice // Store the config globally
return nil
}
Expand Down Expand Up @@ -124,7 +126,7 @@ func StartServer(ctx context.Context, port int) *MDNSServer {
log.Errorw("NewMDNSServer failed", "err", err)
return nil
}
log.Info("NewZeroConfService server started")
log.Debug("NewZeroConfService server started")

// Listen for context done signal to close the server
go func() {
Expand All @@ -137,7 +139,7 @@ func StartServer(ctx context.Context, port int) *MDNSServer {

func NewZeroConfService(port int) (*MDNSServer, error) {
meta := createInfo()
log.Infow("mdns meta created", "meta", meta)
log.Debugw("mdns meta created", "meta", meta)

service, err := zeroconf.Register(
"fulatower", // service instance name
Expand All @@ -152,7 +154,7 @@ func NewZeroConfService(port int) (*MDNSServer, error) {
log.Errorw("zeroconf.Register failed", "err", err)
return nil, err
}
log.Info("NewZeroConfService registered")
log.Debug("NewZeroConfService registered")
service.TTL(2)

return &MDNSServer{server: service}, nil
Expand Down

0 comments on commit 3e2bca2

Please sign in to comment.