Open gjohnson opened 9 years ago
So we can pass our logger to mongo, nsq, etc. Seems like most packages define their internal logger with:
interface Logger { Output(depth int, s string) error }
http://golang.org/src/pkg/log/log.go?s=4418:4472#L120 https://github.com/bitly/nsq/blob/master/nsqd/logger.go https://github.com/go-mgo/mgo/blob/v2/log.go#L40-L42
SGTM! might be nice to just "inherit" the stdlog via:
type Log struct { *std.Logger }
just slap our junk on top
So we can pass our logger to mongo, nsq, etc. Seems like most packages define their internal logger with:
http://golang.org/src/pkg/log/log.go?s=4418:4472#L120 https://github.com/bitly/nsq/blob/master/nsqd/logger.go https://github.com/go-mgo/mgo/blob/v2/log.go#L40-L42