Replies: 1 comment
-
Another "problem" is that request.logger.bind is marked as typing error, which is the whole point of structlog |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using structlog and templated responses with jinja2.
I found the default logging via structlog plugin too verbose - e.g. it logs the full body of response. It not only logs the full html page I render, but also logs static file(!) responses which I am sure no one wants by default.
So I am currently have this setup
Currently one can not correlate response logging with request logging - which request caused which response.
So my question is on what building blocks should help me achieve the following:
Overall I would prefer to use the same logger instance both for response and request in most cases.
Can I use anything from the library for this? Or I need to build my own middleware for this?
Beta Was this translation helpful? Give feedback.
All reactions