hashicorp / mdns

Simple mDNS client/server library in Golang
MIT License
1.19k stars 210 forks source link

Is there any way to turn off "Closing client" messages? #97

Open cbrake opened 1 year ago

cbrake commented 1 year ago

I have an application that occasionally scans looking for new devices -- is there any way to turn off the "Closing client" log message:

https://github.com/hashicorp/mdns/blob/master/client.go#L188

Or is there a good reason to have this message in a running system?

xiegeo commented 1 year ago

You can do this as a workaround:

func init() {
    log.Default().SetOutput(io.Discard)
}
cbrake commented 1 year ago

thanks @xiegeo!

is there any reason this message can't be simply removed? Is this repo still maintained or should it be forked?

cbrake commented 1 year ago

forked in Simple IoT project: https://github.com/simpleiot/mdns