From d58c8f115ee357d46eaee0a82b81d17417a0e4a4 Mon Sep 17 00:00:00 2001 From: bakito Date: Sun, 18 Apr 2021 19:31:42 +0200 Subject: [PATCH] log status --- pkg/client/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/client/client.go b/pkg/client/client.go index 1a812e8..8f5ce54 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -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()) }