smira / go-statsd

Go statsd client library with zero allocation overhead, great performance and reconnects
MIT License
109 stars 18 forks source link

Allow using any logger #11

Closed horkhe closed 5 years ago

horkhe commented 5 years ago

With this change you can initialize a client logger with any logger implementation that provides Printf(fmt string, args... interface{}) function and not just the standard one.

I was going to name the logger interface just Logger, but unfortunately this name had already been taken by a functional parameter, and it is too late to rename functional parameters to follow With... convention.

horkhe commented 5 years ago

@smira I would appreciate a feedback on that.

smira commented 5 years ago

@horkhe change looks good to me, there're unrelated linter errors which I'll have PR to fix in a minute

horkhe commented 5 years ago

@smira I have added the missing doc. When you merge this, could you please tag the commit, so that a version rather than a revision hash can be used in Gopkg.toml.

smira commented 5 years ago

Sure, v1.1.1 released, thanks!