Skip to content

Commit 6f49128

Browse files
Jeff Peelerkibbles-n-bytes
Jeff Peeler
authored andcommitted
Fix several logging errors (#1464)
There were several problems with incorrect number of arguments, unnecessary quoting, and not using httpErr's error method.
1 parent 2aece61 commit 6f49128

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pkg/controller/controller_binding.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ func (c *controller) reconcileServiceBinding(binding *v1beta1.ServiceBinding) er
273273
if err != nil {
274274
s := fmt.Sprintf(`Failed to get namespace %q during binding: %s`, instance.Namespace, err)
275275
glog.Infof(
276-
`%s "%s/%s": `,
276+
`%s "%s/%s": %s`,
277277
typeSB, binding.Namespace, binding.Name, s,
278278
)
279279
c.recorder.Eventf(binding, corev1.EventTypeWarning, errorFindingNamespaceServiceInstanceReason, s)

pkg/controller/controller_instance.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ func (c *controller) reconcileServiceInstanceDelete(instance *v1beta1.ServiceIns
374374
if err != nil {
375375
if httpErr, ok := osb.IsHTTPError(err); ok {
376376
s := fmt.Sprintf(
377-
"Deprovision call failed; received error response from broker: Status Code: %d, Error Message: %v, Description: %v",
378-
httpErr.StatusCode, httpErr.ErrorMessage, httpErr.Description,
377+
"Deprovision call failed; received error response from broker: %v",
378+
httpErr.Error(),
379379
)
380380
glog.Warningf(
381381
`%s "%s/%s": %s`,
@@ -1319,7 +1319,7 @@ func (c *controller) pollServiceInstance(instance *v1beta1.ServiceInstance) erro
13191319
}
13201320

13211321
glog.V(4).Infof(
1322-
`%s "%s/%s": Poll returned %q : %q`,
1322+
`%s "%s/%s": Poll returned %q : Response description: %v`,
13231323
typeSI, instance.Namespace, instance.Name, response.State, response.Description,
13241324
)
13251325

@@ -1783,7 +1783,7 @@ func (c *controller) resolveClusterServicePlanRef(instance *v1beta1.ServiceInsta
17831783
instance.Spec.ClusterServicePlanName, instance.Spec.ClusterServiceClassName,
17841784
)
17851785
glog.Warningf(
1786-
`%s "%s/%s": `,
1786+
`%s "%s/%s": %s`,
17871787
typeSI, instance.Namespace, instance.Name, s,
17881788
)
17891789
c.updateServiceInstanceCondition(
@@ -1869,7 +1869,7 @@ func setServiceInstanceConditionInternal(toUpdate *v1beta1.ServiceInstance,
18691869

18701870
glog.V(3).Infof(
18711871
`%s "%s/%s": Setting lastTransitionTime, condition %q to %v`,
1872-
toUpdate.Namespace, toUpdate.Name, conditionType, t,
1872+
typeSI, toUpdate.Namespace, toUpdate.Name, conditionType, t,
18731873
)
18741874
newCondition.LastTransitionTime = t
18751875
toUpdate.Status.Conditions = append(toUpdate.Status.Conditions, newCondition)

0 commit comments

Comments
 (0)