On 2017-08-25 10:45, Henrik Johansson wrote:
> Me neither but it can be very neat occasionally.
> 
> Agreed and it also applies fine things like Tracing.
> But logger? If you change logger implementation you have to have a
> wrapper or you have to change the type conversions everywhere.

But isn't that a general problem - regardless of the specific question
of this thread.
I just keep logging concerns for the application. On the rare occasions
logging from a library is useful, I provide an API to set a callback
with a simple generic interface.
Like SetLogger(func(int level, msg string))
If rewriting to change logger implementation is intolerable to the
application, the application could define its own interface to a logging
abstraction.

/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 golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to