Skip to content

Commit 73763b8

Browse files
Add request query parameters to Complement request debug logs (#250)
When using `COMPLEMENT_DEBUG=1`, here is the terminal output: Before: ``` msc2716_test.go:899: Making POST request to http://localhost:57176/_matrix/client/unstable/org.matrix.msc2716/rooms/%21WfOaOcxJTCHBxspVgq:hs1/batch_send msc2716_test.go:899: Request body: {"events":[{"content":{"body":"Historical 0 (batch=0)","msgtype":"m.text","org.matrix.msc2716.historical":true},"origin_server_ts":1638404618714,"sender":"@maria:hs1","type":"m.room.message"}],"state_events_at_start":[{"content":{"displayname":"some-display-name-for-@maria:hs1","membership":"join"},"origin_server_ts":1638404618714,"sender":"@maria:hs1","state_key":"@maria:hs1","type":"m.room.member"}]} ``` After: ``` msc2716_test.go:899: Making POST request to http://localhost:57160/_matrix/client/unstable/org.matrix.msc2716/rooms/%21KblUOBFIMMmAVoZnpQ:hs1/batch_send?prev_event_id=%241GidKbmhon-1habkcZokuhcjjvcLLQ5xq2FoVHrdk1E msc2716_test.go:899: Request body: {"events":[{"content":{"body":"Historical 0 (batch=0)","msgtype":"m.text","org.matrix.msc2716.historical":true},"origin_server_ts":1638404572878,"sender":"@maria:hs1","type":"m.room.message"}],"state_events_at_start":[{"content":{"displayname":"some-display-name-for-@maria:hs1","membership":"join"},"origin_server_ts":1638404572878,"sender":"@maria:hs1","state_key":"@maria:hs1","type":"m.room.member"}]} ```
1 parent a507a05 commit 73763b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/client/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ func (c *CSAPI) DoFunc(t *testing.T, method string, paths []string, opts ...Requ
430430
}
431431
// debug log the request
432432
if c.Debug {
433-
t.Logf("Making %s request to %s", method, reqURL)
433+
t.Logf("Making %s request to %s", method, req.URL)
434434
contentType := req.Header.Get("Content-Type")
435435
if contentType == "application/json" || strings.HasPrefix(contentType, "text/") {
436436
if req.Body != nil {

0 commit comments

Comments
 (0)