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
While fmt.Sprintf() may be less performant than string concatenate, it's a nicer reading experience. At our current scale, the performance hit shouldn't be relevant. For logging purposes though, we should be using the zap.Logger.Sugar().Infof() instead since should evaluate the log statement unless it's configured to log; fmt.Sprintf() will evaluate the string regardless of the log level which means it could be doing unnecessary work.
The text was updated successfully, but these errors were encountered:
While
fmt.Sprintf()
may be less performant than string concatenate, it's a nicer reading experience. At our current scale, the performance hit shouldn't be relevant. For logging purposes though, we should be using thezap.Logger.Sugar().Infof()
instead since should evaluate the log statement unless it's configured to log;fmt.Sprintf()
will evaluate the string regardless of the log level which means it could be doing unnecessary work.The text was updated successfully, but these errors were encountered: