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

Request and Response in One Line Log Format #111

Open
dwicahjo opened this issue Sep 29, 2020 · 3 comments
Open

Request and Response in One Line Log Format #111

dwicahjo opened this issue Sep 29, 2020 · 3 comments

Comments

@dwicahjo
Copy link

Currently, for every request, the logger will log both request and response URL, headers, and body as a separate line. There some cases that the log will not be in the right sequence if there are multiple requests at one time.
Is there some way to have the log in one line format (each line of a log includes request and response data) using this middleware?

@Wissperwind
Copy link

I agree, I would also prefere this.

@vpapaioannou
Copy link

Similarly, it would be great to be able to choose which parts of the response to show. In Django and debugging mode, also the status of the response is shown right after the request string e.g.

[21/Jun/2022 13:18:57] "GET /api/my_request/50/ HTTP/1.1" 200 265

@gquittet
Copy link

gquittet commented Nov 4, 2022

@dwicahjo @vpapaioannou @Wissperwind

You can use this solution: eht16/python-logstash-async#74 (comment) without using this library.

Just change the handler from logstash to console and you're good 👍

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

No branches or pull requests

4 participants