Skip to content

Commit

Permalink
Use Infof/Warningf when appropriate
Browse files Browse the repository at this point in the history
When we use a format string, we should use Infof/Warningf instead
of Info/Warning
  • Loading branch information
dims committed Jul 19, 2016
1 parent d9fbb9f commit ee8507a
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ func (k *framework) reconcileTerminalTask(driver bindings.SchedulerDriver, taskS
//is unrecognized by the master at this point, so KillTask is not guaranteed
//to do anything. The underlying driver transport may be able to send a
//FrameworkMessage directly to the slave to terminate the task.
log.V(2).Info("forwarding TASK_LOST message to executor %v on slave %v", taskStatus.ExecutorId, taskStatus.SlaveId)
log.V(2).Infof("forwarding TASK_LOST message to executor %v on slave %v", taskStatus.ExecutorId, taskStatus.SlaveId)
data := fmt.Sprintf("%s:%s", messages.TaskLost, task.ID) //TODO(jdef) use a real message type
if _, err := driver.SendFrameworkMessage(taskStatus.ExecutorId, taskStatus.SlaveId, data); err != nil {
log.Error(err.Error())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (s *podReconciler) Reconcile(t *podtask.T) {
} else {
//TODO(jdef) other errors should probably trigger a retry (w/ backoff).
//For now, drop the pod on the floor
log.Warning("aborting reconciliation for pod %v: %v", t.Pod.Name, err)
log.Warningf("aborting reconciliation for pod %v: %v", t.Pod.Name, err)
}
return
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudprovider/providers/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ func (c *Cloud) DetachDisk(diskName string, instanceName string) (string, error)
}

if !alreadyAttached {
glog.Warning("DetachDisk called on non-attached disk: %s", diskName)
glog.Warningf("DetachDisk called on non-attached disk: %s", diskName)
// TODO: Continue? Tolerate non-attached error in DetachVolume?
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/cloudprovider/providers/vsphere/vsphere.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,9 @@ func (i *Instances) InstanceID(name string) (string, error) {
}

if mvm.Summary.Config.Template == false {
glog.Warning("VM %s, is not in %s state", name, ActivePowerState)
glog.Warningf("VM %s, is not in %s state", name, ActivePowerState)
} else {
glog.Warning("VM %s, is a template", name)
glog.Warningf("VM %s, is a template", name)
}

return "", cloudprovider.InstanceNotFound
Expand Down
2 changes: 1 addition & 1 deletion pkg/dns/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (kd *KubeDNS) newService(obj interface{}) {
return
}
if len(service.Spec.Ports) == 0 {
glog.Warning("Unexpected service with no ports, this should not have happend: %v", service)
glog.Warningf("Unexpected service with no ports, this should not have happend: %v", service)
}
kd.newPortalService(service)
}
Expand Down
2 changes: 1 addition & 1 deletion plugin/pkg/scheduler/factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ func (factory *ConfigFactory) makeDefaultErrorFunc(backoff *podBackoff, podQueue
break
}
if errors.IsNotFound(err) {
glog.Warning("A pod %v no longer exists", podID)
glog.Warningf("A pod %v no longer exists", podID)
return
}
glog.Errorf("Error getting pod %v for retry: %v; retrying...", podID, err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func TestPersistentVolumeBindRace(t *testing.T) {
newPvc.ObjectMeta = api.ObjectMeta{Name: fmt.Sprintf("fake-pvc-race-%d", counter)}
claim, err := testClient.PersistentVolumeClaims(ns.Name).Create(newPvc)
if err != nil {
t.Fatal("Error creating newPvc: %v", err)
t.Fatalf("Error creating newPvc: %v", err)
}
claims = append(claims, claim)
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/mesos/mesos-go/executor/executor.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ee8507a

Please sign in to comment.