Closed ripienaar closed 2 years ago
If you logger is a log.Logger, can change the hap logger like this.
import(
hclog "github.com/brutella/hc/log"
"log"
)
var mylogger *log.Logger
hclog.Debug = &hclog.Logger{mylogger}
hclog.Info = &hclog.Logger{mylogger}
Would you be open to accepting a PR that makes the actual logger a pluggable? So I can wrap my projects logger in an interface that I give to hc, this way your logs end up within the logging the controlling project maintains?
Default behaviour would be exactly as is today
If so, I can look to do a PR, just wanted to test the water first.
thanks