diff options
author | Alex Auvolat <alex@adnab.me> | 2020-02-27 10:35:09 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-02-27 10:35:09 +0100 |
commit | 19975e981ed0f1fbd96644d95ede5435bfbdccfc (patch) | |
tree | 02c0b5df7583f212de9dfe9dbebff1e6fc8160fd /mxlib | |
parent | 6bbf08af8f8acc93d6aed721f56d70c8aca75ed4 (diff) | |
download | easybridge-19975e981ed0f1fbd96644d95ede5435bfbdccfc.tar.gz easybridge-19975e981ed0f1fbd96644d95ede5435bfbdccfc.zip |
Logging done better
Diffstat (limited to 'mxlib')
-rw-r--r-- | mxlib/client.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mxlib/client.go b/mxlib/client.go index e382ddd..71bba3f 100644 --- a/mxlib/client.go +++ b/mxlib/client.go @@ -50,7 +50,7 @@ func (mx *Client) PutApiCall(endpoint string, data interface{}, response interfa return err } - log.Debugf("Matrix PUT request: %s %s\n", endpoint, string(body)) + log.Debugf("Matrix PUT request: %s\n", endpoint) req, err := http.NewRequest("PUT", mx.Server+endpoint, bytes.NewBuffer(body)) if err != nil { @@ -67,7 +67,7 @@ func (mx *Client) PostApiCall(endpoint string, data interface{}, response interf return err } - log.Debugf("Matrix POST request: %s %s\n", endpoint, string(body)) + log.Debugf("Matrix POST request: %s\n", endpoint) req, err := http.NewRequest("POST", mx.Server+endpoint, bytes.NewBuffer(body)) if err != nil { @@ -94,7 +94,7 @@ func (mx *Client) DoAndParse(req *http.Request, response interface{}) error { if err != nil { return err } - log.Debugf("Response (%d): %#v\n", resp.StatusCode, e) + log.Debugf("Response: %d %#v\n", resp.StatusCode, e) return &e } @@ -103,7 +103,7 @@ func (mx *Client) DoAndParse(req *http.Request, response interface{}) error { return err } - log.Debugf("Response: %#v\n", response) + log.Debugf("Response: 200 OK") return nil } |