News for hackers. Stuff that matters.
Re:Gopher Wrangling. Effective error handling in Go by janosdebugs on Tuesday June 20, 2023 @06:08AM (#36401884)
>> 6

> Not sure about "most" loggers, but I have no problem with zap. Popular, definetelly can be injected etc.

That may be so, but a lot of libraries use a logger that isn't zap and isn't injectable, or the library doesn't expose a way to inject a logger even if the logger itself supports it. Plus, if you have 3 dependencies, you'll end up with 4 different logging libraries you need to worry about. In the end, you end up having a mess around logging unless you only rely on your own code and don't use libraries.

(Should have phrased the parent better.)

Re:Gopher Wrangling. Effective error handling in Go by konart on Wednesday June 21, 2023 @01:40AM (#36414792)
I haven't seen a package that does not provide a way to inject a logger to be honest. I'd rather not use one or an least fork one if I'm out of options.
Re:Gopher Wrangling. Effective error handling in Go by janosdebugs on Wednesday June 21, 2023 @02:00AM (#36414932)
I ran into a fair few while developing Kubernetes stuff, unfortunately. Even so, you can still end up with a bunch of different loggers in your codebase because logger libraries can't even seem to agree what log levels to support and in what form.