feat: WithLogger Provider Option#833
Conversation
* ability to respect the current behavior of `SetLogger` for Goose Providers
|
Ah yes, we'll for sure add this. The only reason I was delaying this as much as possible was to figure out the UX around it. Should we continue to use the Logger interface, or use |
Indeed, a slog.Logger implemented could be a good thing, though it requires us (everybody) to have a structured logging system that is compliant with slog.logger. I must admit that I don't know much about it. I maybe push things to another brighter day 😅 |
|
I took a stab at exposing an Do you think #836 would be sufficient? It also means you have a bit more control over the output, although i doubt most applications really care. |
Hi there, honestly this looks the right approach to tend towards a I don't know yet much about slogger, I saw that there are some bridges between kr. |
|
Thanks for the feedback. I'm okay adding the interface-based In the future I'll need to revisit logging, either by extending the package with |
SetLoggerfor Goose ProvidersCurrently goose provides a
SetLoggermethod to overload the goose logger.Goose providers doesn't provide such mechanism, leading to a painful use to do full structured logging when embedding goose into a custom package.
how to use (with zerolog)
which outputs: