Improve logging
This commit is contained in:
parent
2a26177fb5
commit
202bcaab3f
|
@ -94,6 +94,7 @@ func (h *hubIncomingBackend) CreateFeed(topic string) int64 {
|
||||||
q.Add("hub.secret", secret)
|
q.Add("hub.secret", secret)
|
||||||
hub.RawQuery = q.Encode()
|
hub.RawQuery = q.Encode()
|
||||||
|
|
||||||
|
log.Printf("POST %s\n", hub)
|
||||||
req, err := http.NewRequest("POST", hub.String(), nil)
|
req, err := http.NewRequest("POST", hub.String(), nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("new request: %s\n", err)
|
log.Printf("new request: %s\n", err)
|
||||||
|
@ -102,11 +103,14 @@ func (h *hubIncomingBackend) CreateFeed(topic string) int64 {
|
||||||
|
|
||||||
client := &http.Client{}
|
client := &http.Client{}
|
||||||
|
|
||||||
_, err = client.Do(req)
|
res, err := client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("subscription request: %s\n", err)
|
log.Printf("subscription request: %s\n", err)
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
defer res.Body.Close()
|
||||||
|
|
||||||
|
fmt.Println(res)
|
||||||
|
|
||||||
return id
|
return id
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user