I spent several hours trying to figure an issue with zerolog, which i reported here - https://github.com/rs/zerolog/issues/434, and which I eventually traced to the fact that httplog.NewLogger, via httplog.Configure sets global zerolog configurations.
This is a problem - in my use case go-chi is used to expose some webhooks from an application that is not a rest API primarily, but also in other cases the user may not want to use the httplog logger throughout the application but rather import directly from github.com/rs/zerolog/log or create an application specific logger in a logger package. Furthermore, its completely obfuscated that this is happening, leading to a very annoying and complex debug process.
I would therefore like to request / suggest that httplog removes the global configuration, which from my PoV are completely unnecessary there.
Hi there,
I spent several hours trying to figure an issue with zerolog, which i reported here - https://github.com/rs/zerolog/issues/434, and which I eventually traced to the fact that
httplog.NewLogger
, viahttplog.Configure
sets global zerolog configurations.This is a problem - in my use case go-chi is used to expose some webhooks from an application that is not a rest API primarily, but also in other cases the user may not want to use the httplog logger throughout the application but rather import directly from
github.com/rs/zerolog/log
or create an application specific logger in a logger package. Furthermore, its completely obfuscated that this is happening, leading to a very annoying and complex debug process.I would therefore like to request / suggest that httplog removes the global configuration, which from my PoV are completely unnecessary there.