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
The alternative would be to eliminate prefixlogger Debugf method (which is internal) method and favor Infof gated by if logger.V(2) {}, like we do in most places. The problem is that PrefixLogger doesn't have a V method, and neither has its DepthLogger member.
Yes, that's what I was thinking, too. We could add this method -- worst case, the PrefixLogger can expose it and just call the global logger like it's doing today.
dfawley
changed the title
Debugf can be misleading
Delete grpclog's Debugf function
May 2, 2024
grpc-go/internal/grpclog/prefixLogger.go
Line 65 in 9cf408e
If a parameter passed to these functions is expensive to evaluate, that expense is borne regardless of whether verbosity would output the message .
All usages should be audited, and we should write another function that allows the arguments to be processed lazily (i.e. pass in closures).
The text was updated successfully, but these errors were encountered: