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 second form is shorter but the first is cheaper if logging is off because it does not evaluate its arguments.
To not evaluate the arguments can be very important for instance if a function is called that searches 100,000 objects for some crucial trace info. You do not want to to that if not on trace level, like V(2). Even though the glog implementation is pretty cool I realize it may not be feasable for logr, but a possibility to read the V-level should be provided.
The text was updated successfully, but these errors were encountered:
The glog.V() function allows;
This is the reason;
To not evaluate the arguments can be very important for instance if a function is called that searches 100,000 objects for some crucial trace info. You do not want to to that if not on trace level, like V(2). Even though the glog implementation is pretty cool I realize it may not be feasable for
logr
, but a possibility to read the V-level should be provided.The text was updated successfully, but these errors were encountered: