You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log.Ctx(ctx) returns the associated logger if it's been registered in the ctx and returns disabledLogger otherwise. I think it should instead return the global logger.
It doesn't totally make intuitive sense to me that if a logger has not been registered in a context, that we by default assume logging should be disabled. My use case it to pass a sub-logger. If I miss a call to sublogger.WithContext() somewhere, I don't want logging to be erroneously disabled as a result.
The text was updated successfully, but these errors were encountered:
log.Ctx(ctx)
returns the associated logger if it's been registered in thectx
and returnsdisabledLogger
otherwise. I think it should instead return the global logger.It doesn't totally make intuitive sense to me that if a logger has not been registered in a context, that we by default assume logging should be disabled. My use case it to pass a sub-logger. If I miss a call to
sublogger.WithContext()
somewhere, I don't want logging to be erroneously disabled as a result.The text was updated successfully, but these errors were encountered: