Skip to content
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

Filter: logBody("request", "response") #2741

Closed
wants to merge 1 commit into from
Closed

Conversation

trkohler
Copy link
Member

This filter logs body for the request if body has proper content type. When body is json / xml, it applies formatting.

should resolve: #2282

@trkohler
Copy link
Member Author

closing because streaming approach is preferred and it's being worked on in #2428

@trkohler trkohler closed this Nov 17, 2023
@szuecs
Copy link
Member

szuecs commented Nov 17, 2023

That's also pretty nice to have formatting as option maybe. I did only plain string log. Do you have any use case in mind for the pretty print?
We could do this as option to logBody(). Right now we have only "request" and "response" as options, but we could also add something like "pretty".

@trkohler
Copy link
Member Author

I've noticed that in example there (#2282 (comment)) json was used and I thought that in the most cases users would be interested to log requests/response bodies which have some structure, rather than octet streams / gifs / etc. And because of that, I thought it would be a convenient to support formatting out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filters: logBody("request", "response")
2 participants