Skip to content

Commit

Permalink
more logging around setactive
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdarkdragon committed Aug 14, 2020
1 parent 062449e commit 9bc0d5e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apis/livepeer/livepeer.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,16 @@ func (lapi *API) SetActive(id string, active bool) (bool, error) {
req.Header.Add("Content-Type", "application/json")
resp, err := httpClient.Do(req)
if err != nil {
glog.Errorf("Error set active %v", err)
glog.Errorf("id=%s/setactive Error set active %v", id, err)
return true, err
}
b, err = ioutil.ReadAll(resp.Body)
if err != nil {
glog.Errorf("Error set active (body) %v", err)
glog.Errorf("id=%s/setactive Error set active (body) %v", err)
return true, err
}
resp.Body.Close()
glog.Infof("%s/setactive response status code %d status %s resp %+v", resp.StatusCode, resp.Status, resp)
return resp.StatusCode >= 200 && resp.StatusCode < 300, nil
}

Expand Down

0 comments on commit 9bc0d5e

Please sign in to comment.