-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
(958) Add exception logging in debug mode #976
Merged
Goldziher
merged 19 commits into
litestar-org:main
from
JacobCoffee:985_debug_console_log_enhancements
Feb 4, 2023
Merged
Changes from 8 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
5320752
feat: add console output for exceptions in debug mode
JacobCoffee 5f0a127
Merge branch 'main' into 985_debug_console_log_enhancements
JacobCoffee 0f19be7
chore: middleware debug logging updates
JacobCoffee 5105bd2
Merge branch 'main' into 985_debug_console_log_enhancements
cofin ad951a3
feat: #958 testing passing
JacobCoffee 998c4cd
Update starlite/middleware/exceptions/middleware.py
JacobCoffee fd3c4be
Merge branch 'main' into 985_debug_console_log_enhancements
JacobCoffee 5f37e99
chore: fixed test for middleware debug logging (#958)
JacobCoffee bac6a18
Update tests/middleware/test_exception_handler_middleware.py
provinzkraut de75bdf
Merge branch 'main' into 985_debug_console_log_enhancements
JacobCoffee e42d927
chore: fixed test for middleware debug logging (#958)
JacobCoffee faf06a1
Merge branch 'main' into 985_debug_console_log_enhancements
peterschutt dc74af2
Use `get_logger` fixture to test exception logged in debug.
peterschutt 7a173e7
Merge pull request #4 from peterschutt/985_debug_console_log_enhancem…
JacobCoffee a65bfbc
Merge branch 'main' into 985_debug_console_log_enhancements
JacobCoffee 9bc01e6
chore: Updated assertions (#958)
JacobCoffee 8a0d0ed
Update starlite/middleware/exceptions/middleware.py
JacobCoffee dffccbf
chore: update logger method
JacobCoffee bde38f2
Merge branch 'main' into 985_debug_console_log_enhancements
JacobCoffee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps, but it broke my test 🙃 looking into why tonight hopefully
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe because the function isn’t called
get_logge
butget_logger
? 😉There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i fixed that as soon as i committed the suggestion and realized 😛
commit dffccbf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this change breaks the test, it most likely is because we are patching
app.logger
with response of calling theget_logger
fixture in the test, whereas for this to work, we'd have to patch theapp.get_logger
attribute with the get_logger fixture itself.In the starlite constructor, we both assign the get_logger callable and a logger instance to the application instance:
...and it wasn't obvious to me which one we should be using in this case either.