-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response body doesn't appear to log correctly in SDKLogger #93
Comments
@zbuchheit Thank you for reporting this issue! |
I don't suspect any use of logging a body here should work. Do you have an example of logging the body of a response successfully? I don't think you can json.Marshal(response.Body); and it work. In my testing, json.Marshal ends up just converting response.Body to be {} |
have you been able to replicate the behavior @haseeb-mhr |
@zbuchheit Thank you for bringing this to our attention. I have replicated the behavior and working on implementing a fix for it. |
great news! Thank you! |
@zbuchheit The changes have been released. Please bump to the latest version to incorporate the fix. Let me know if you encounter any further issues! |
Describe the bug
A clear and concise description of what the bug is.
Where did you find this bug?
Expected behavior
I would expect the response body to be correctly logged
To Reproduce
Steps to reproduce the bug:
Code Link
It appears the issue stems from the below code. Body is type io.ReadCloser so this doesn't work correctly.
go-core-runtime/logger/sdkLogger.go
Line 121 in b368c82
Library version number
For example: 0.1.1
Environmental details
For example:
OS: Linux
Runtime version: GO 1.18
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: