On 2017-08-15 21:34, Tamás Gulácsi wrote:
> Even better: my libraries expose only the LogFunc: i.e.
> var Log = func(keyvals ...interface{}) error { return nil}
>
> Which is easy to override with any logger, is not tied to go-kit/log, but
> provides structured logging!
... or exposing some lib.SetLogger(...) function.
But preferably, one should try not to log from libraries and return
errors instead and leave logging to the application - if possible.
There's few things more annoying than libraries spitting something out
where you least need it.
/Peter
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.