4 ms·
>> 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 l
by janosdebugs 3y ago
>> 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.)
- konart 3y agoI 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.
- janosdebugs 3y agoI 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.