Setting LoggingConfig.log_exceptions
to "always"
is good to get more data about uncaught exceptions in a debug=False
environment but can get pretty noisy, since we'll also log some common errors for schema validation, auth, etc when the developer might really only be interested in uncaught internal server errors.
It would be helpful if we could configure this according to HTTP status codes (or perhaps Union[int, type[Exception]]
- similar to the keys of ExceptionHandlersMap
?) and only log when raising for these status codes/types
Something like
LoggingConfig(exceptions={422, 500, MyCustomException})
N/A
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too