GCE provider: Fix minor cosmetic logging issue

Log the pollOp, not the base op.
This commit is contained in:
Zach Loafman 2016-06-13 14:48:16 -07:00
parent 94f8c9fbc5
commit 49b3936829

View File

@ -445,9 +445,9 @@ func (gce *GCECloud) waitForOp(op *compute.Operation, getOperation func(operatio
duration := time.Now().Sub(opStart)
if duration > 1*time.Minute {
// Log the JSON. It's cleaner than the %v structure.
enc, err := op.MarshalJSON()
enc, err := pollOp.MarshalJSON()
if err != nil {
glog.Warningf("waitForOperation: long operation (%v): %v (failed to encode to JSON: %v)", duration, op, err)
glog.Warningf("waitForOperation: long operation (%v): %v (failed to encode to JSON: %v)", duration, pollOp, err)
} else {
glog.Infof("waitForOperation: long operation (%v): %v", duration, string(enc))
}