1
0
Fork 0

More disco client logging

master
Philip O'Toole 8 years ago
parent 2fc1d266c9
commit 242cc2e09c

@ -53,7 +53,7 @@ func (c *Client) Register(id, addr string) (*Response, error) {
return nil, err
}
c.logger.Println("discovery client attempting registration at", url)
c.logger.Printf("discovery client attempting registration of %s at %s", addr, url)
resp, err := http.Post(url, "application-type/json", bytes.NewReader(b))
if err != nil {
return nil, err
@ -71,6 +71,7 @@ func (c *Client) Register(id, addr string) (*Response, error) {
if err := json.Unmarshal(b, r); err != nil {
return nil, err
}
c.logger.Printf("discovery client successfully registered %s at %s", addr, url)
return r, nil
case http.StatusMovedPermanently:
url = c.registrationURL(resp.Header.Get("location"), id)

Loading…
Cancel
Save