I'm in the process of converting our application (evcc.io) from using 
spf13/jwalterweatherman for logging to log/slog. One current pain point is 
passing loggers around the application and deriving child loggers. With 
using slog there are various options for doing that:

Passing loggers:

   - pass parent logger as parameter
   - pass a context and retrieve the parent logger from context value
   

Passing log attributes/groups to child loggers:

   - assign them to loggers and pass them via the logger (see before- 
   either as parameter or context value)
   - assign them to context and retrieve them from context value for 
   assigning to the child logger
   
Not sure those questions are clear enough, but let's try: are there 
experiences what works "best" in larger applications?

Cheers,
Andi

-- 
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 visit 
https://groups.google.com/d/msgid/golang-nuts/38bf1b02-3c20-4912-804f-ac200326e2cen%40googlegroups.com.

Reply via email to