mesh
mesh copied to clipboard
Change concrete *log.Logger to mesh.Logger interface
trafficstars
Proposed interface
type Logger interface {
Logf(format string, args ...interface{})
}
Compare https://github.com/Sirupsen/logrus/blob/master/logrus.go#L97
(not claiming I can see an easy middle ground)
See also https://github.com/weaveworks/weave/commit/c38dcb1d73349eaf5336d6541552e1edb15ff7db
Yeah, there's a lot to consider. I'm definitely against an interface with more than 1 method, see this presentation from a Go kit collaborator for a good recap of my journey with logging. And sorry to make you use that logLogger.