nuagenetworks/go-bambou

additional logger should be added to display the request body

Closed this issue · 2 comments

hellt commented

Currently with the log Debug level set the library only exposes the request Method, URL and Header - see https://github.com/nuagenetworks/go-bambou/blob/master/bambou/session.go#L214

Although this is not enough for a successful troubleshooting, since the request Body is missing, and we pass the object configuration in the POST/PUT requests body. I propose to add the additional Log statement

log.Debugf("Request Payload: %s", request.Body)

to the logger statements on line 216 to display the contents of the body. This is critical for troubleshooting and should not be omitted.

/cc @pdellaert

@hellt, good idea... I'd say: open a PR? Otherwise i might be able to look at it soonish (next 7 days, depending on other stuff), but no promise. Got some other stuff to tackle first :(

Thanks, @hellt