Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Throughout the code we have lots of places where we use the following call structure:
zap.String("text here", object.String())
This causes the object.String() call to happen before we even consider if it needs to be logged. Zap has a lazy way of doing this that removes the call to create the stringĀ until it is needed, after the level checks etc. The above call becomes:
zap.Stringer("text here", object)
Affect core and k8shim