On Tue, Aug 31, 2021 at 8:58 AM Kevin Chowski <ke...@chowski.com> wrote:
<snip> > To the original poster: can you just declare your own Logger-like interface > and allow users of your library to pass whatever logging implementation they > have? In what ways are you thinking that you're forced to be coupled with the > standard library's implementation? Yes, I can do that - that's a good idea actually - although more complicated than one I would have liked for my use-case (more on this in my original post and below), but certainly a feasible one with long term benefits. > In what ways are you thinking that you're forced to be coupled with the > standard library's implementation? When I first add some logging to my application, I am doing it using the standard library's log.Printf(), log.Println(), log.Fatal() and friends. Now, I reach a point of time where I want to start structured logging but i want to do it incrementally. My existing Printf(), Println() calls should continue to build. The only change I want to do initially is simply change how I am constructing the log.Logger object. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CANODV3mkFd6MXFkHcVdBCU%2BLwOVPNGUPeP1TSLKQ2B3rQ_oyaQ%40mail.gmail.com.