From 2b5b28be48521f2833f1851d0952e219e78d62b9 Mon Sep 17 00:00:00 2001 From: Jeremy Unruh Date: Sun, 23 Jul 2017 10:12:27 -0700 Subject: [PATCH] fix previous PR compile issues --- marathon/application.go | 16 ++++++++-------- pkg/httpclient/client.go | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/marathon/application.go b/marathon/application.go index da75e24..0a4a58b 100644 --- a/marathon/application.go +++ b/marathon/application.go @@ -67,7 +67,7 @@ func (c *MarathonClient) CreateApplicationFromString(filename string, appstr str } func (c *MarathonClient) ParseApplicationFromFile(filename string, opts *CreateOptions) (*Application, error) { - log.Infof("Creating Application from file: %s", filename) + log.Info("Creating Application from file: %s", filename) file, err := os.Open(filename) if err != nil { @@ -113,7 +113,7 @@ func (c *MarathonClient) ParseApplicationFromString(r io.Reader, et encoding.Enc } func (c *MarathonClient) CreateApplication(app *Application, wait, force bool) (*Application, error) { - log.Infof("Creating Application '%s', wait: %v, force: %v", app.ID, wait, force) + log.Info("Creating Application '%s', wait: %v, force: %v", app.ID, wait, force) result := new(Application) resp := c.http.HttpPost(c.marathonUrl(API_APPS), app, result) @@ -146,7 +146,7 @@ func (c *MarathonClient) CreateApplication(app *Application, wait, force bool) ( } func (c *MarathonClient) UpdateApplication(app *Application, wait bool, force bool) (*Application, error) { - log.Infof("Update Application '%s', wait = %v", app.ID, wait) + log.Info("Update Application '%s', wait = %v", app.ID, wait) result := new(DeploymentID) id := utils.TrimRootPath(app.ID) app.ID = "" @@ -202,7 +202,7 @@ func (c *MarathonClient) ListApplicationsWithFilters(filter string) (*Applicatio } func (c *MarathonClient) GetApplication(id string) (*Application, error) { - log.Debugf("Enter: GetApplication: %s", id) + log.Debug("Enter: GetApplication: %s", id) app := new(AppById) resp := c.http.HttpGet(c.marathonUrl(API_APPS, id), app) if resp.Error != nil { @@ -224,7 +224,7 @@ func (c *MarathonClient) HasApplication(id string) (bool, error) { } func (c *MarathonClient) DestroyApplication(id string) (*DeploymentID, error) { - log.Infof("Deleting Application '%s'", id) + log.Info("Deleting Application '%s'", id) deploymentId := new(DeploymentID) resp := c.http.HttpDelete(c.marathonUrl(API_APPS, id), nil, deploymentId) @@ -235,7 +235,7 @@ func (c *MarathonClient) DestroyApplication(id string) (*DeploymentID, error) { } func (c *MarathonClient) RestartApplication(id string, force bool) (*DeploymentID, error) { - log.Infof("Restarting Application '%s', force: %v", id, force) + log.Info("Restarting Application '%s', force: %v", id, force) deploymentId := new(DeploymentID) @@ -248,7 +248,7 @@ func (c *MarathonClient) RestartApplication(id string, force bool) (*DeploymentI } func (c *MarathonClient) PauseApplication(id string) (*DeploymentID, error) { - log.Infof("Suspending Application '%s'", id) + log.Info("Suspending Application '%s'", id) deploymentId := new(DeploymentID) uri := fmt.Sprintf("%s?scale=true&force=true", c.marathonUrl(API_APPS, id, "tasks")) @@ -260,7 +260,7 @@ func (c *MarathonClient) PauseApplication(id string) (*DeploymentID, error) { } func (c *MarathonClient) ScaleApplication(id string, instances int) (*DeploymentID, error) { - log.Infof("Scale Application '%s' to %v instances", id, instances) + log.Info("Scale Application '%s' to %v instances", id, instances) update := new(Application) update.ID = id diff --git a/pkg/httpclient/client.go b/pkg/httpclient/client.go index e8297f1..0c36611 100644 --- a/pkg/httpclient/client.go +++ b/pkg/httpclient/client.go @@ -145,7 +145,7 @@ func (h *HttpClient) CreateHttpRequest(method, urlStr string, body io.Reader) (* func (h *HttpClient) invoke(r *Request) *Response { - log.Debugf("%s - %s, Body:\n%s", r.method.String(), r.url, r.data) + log.Debug("%s - %s, Body:\n%s", r.method.String(), r.url, r.data) request, err := h.CreateHttpRequest(r.method.String(), r.url, strings.NewReader(r.data)) @@ -172,7 +172,7 @@ func (h *HttpClient) invoke(r *Request) *Response { content = string(rc) } - log.Debugf("Status: %v, RAW: %s", status, content) + log.Debug("Status: %v, RAW: %s", status, content) if status >= 200 && status < 300 { if r.result != nil {