Skip to content

Commit

Permalink
Fix several logging errors (#1464)
Browse files Browse the repository at this point in the history
There were several problems with incorrect number of arguments, unnecessary
quoting, and not using httpErr's error method.
  • Loading branch information
jpeeler authored and kibbles-n-bytes committed Oct 23, 2017
1 parent 2aece61 commit 6f49128
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/controller_binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func (c *controller) reconcileServiceBinding(binding *v1beta1.ServiceBinding) er
if err != nil {
s := fmt.Sprintf(`Failed to get namespace %q during binding: %s`, instance.Namespace, err)
glog.Infof(
`%s "%s/%s": `,
`%s "%s/%s": %s`,
typeSB, binding.Namespace, binding.Name, s,
)
c.recorder.Eventf(binding, corev1.EventTypeWarning, errorFindingNamespaceServiceInstanceReason, s)
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller/controller_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ func (c *controller) reconcileServiceInstanceDelete(instance *v1beta1.ServiceIns
if err != nil {
if httpErr, ok := osb.IsHTTPError(err); ok {
s := fmt.Sprintf(
"Deprovision call failed; received error response from broker: Status Code: %d, Error Message: %v, Description: %v",
httpErr.StatusCode, httpErr.ErrorMessage, httpErr.Description,
"Deprovision call failed; received error response from broker: %v",
httpErr.Error(),
)
glog.Warningf(
`%s "%s/%s": %s`,
Expand Down Expand Up @@ -1319,7 +1319,7 @@ func (c *controller) pollServiceInstance(instance *v1beta1.ServiceInstance) erro
}

glog.V(4).Infof(
`%s "%s/%s": Poll returned %q : %q`,
`%s "%s/%s": Poll returned %q : Response description: %v`,
typeSI, instance.Namespace, instance.Name, response.State, response.Description,
)

Expand Down Expand Up @@ -1783,7 +1783,7 @@ func (c *controller) resolveClusterServicePlanRef(instance *v1beta1.ServiceInsta
instance.Spec.ClusterServicePlanName, instance.Spec.ClusterServiceClassName,
)
glog.Warningf(
`%s "%s/%s": `,
`%s "%s/%s": %s`,
typeSI, instance.Namespace, instance.Name, s,
)
c.updateServiceInstanceCondition(
Expand Down Expand Up @@ -1869,7 +1869,7 @@ func setServiceInstanceConditionInternal(toUpdate *v1beta1.ServiceInstance,

glog.V(3).Infof(
`%s "%s/%s": Setting lastTransitionTime, condition %q to %v`,
toUpdate.Namespace, toUpdate.Name, conditionType, t,
typeSI, toUpdate.Namespace, toUpdate.Name, conditionType, t,
)
newCondition.LastTransitionTime = t
toUpdate.Status.Conditions = append(toUpdate.Status.Conditions, newCondition)
Expand Down

0 comments on commit 6f49128

Please sign in to comment.