mirror of
https://github.com/bakito/adguardhome-sync.git
synced 2025-03-01 17:45:28 +08:00
log status
This commit is contained in:
parent
f8dd7e6136
commit
d58c8f115e
1 changed files with 2 additions and 2 deletions
|
@ -107,7 +107,7 @@ func (cl *client) doGet(req *resty.Request, url string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rl.With("body", string(resp.Body())).Debug("got response")
|
||||
rl.With("status", resp.StatusCode(), "body", string(resp.Body())).Debug("got response")
|
||||
if resp.StatusCode() != http.StatusOK {
|
||||
return errors.New(resp.Status())
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ func (cl *client) doPost(req *resty.Request, url string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rl.With("body", string(resp.Body())).Debug("got response")
|
||||
rl.With("status", resp.StatusCode(), "body", string(resp.Body())).Debug("got response")
|
||||
if resp.StatusCode() != http.StatusOK {
|
||||
return errors.New(resp.Status())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue