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

Noisy exceptions - force logging of all exceptions #2262

Merged
merged 15 commits into from Oct 27, 2021
Merged

Noisy exceptions - force logging of all exceptions #2262

merged 15 commits into from Oct 27, 2021

Conversation

prryplatypus
Copy link
Member

@prryplatypus prryplatypus commented Oct 3, 2021

Resolves #2241.

The purpose of this PR is to allow all exceptions to be logged, regardless of them being "quiet" or not.

@prryplatypus prryplatypus linked an issue Oct 3, 2021 that may be closed by this pull request
sanic/__main__.py Outdated Show resolved Hide resolved
@prryplatypus prryplatypus added the needs tests PR that needs additional tests added label Oct 10, 2021
@prryplatypus prryplatypus removed the needs tests PR that needs additional tests added label Oct 12, 2021
@prryplatypus prryplatypus marked this pull request as ready for review October 12, 2021 19:30
@prryplatypus prryplatypus requested a review from a team as a code owner October 12, 2021 19:30
sanic/app.py Outdated Show resolved Hide resolved
@prryplatypus prryplatypus marked this pull request as draft October 14, 2021 18:13
@prryplatypus prryplatypus marked this pull request as ready for review October 15, 2021 19:35
@prryplatypus
Copy link
Member Author

After a hundred thousand iterations, I'm finally happy enough with this for it to be reviewed and merged!

@prryplatypus
Copy link
Member Author

Just realised I need to add some CLI tests for this too. Will do this afternoon.

@prryplatypus
Copy link
Member Author

Good to go now!

@ahopkins ahopkins merged commit f0f81ec into sanic-org:main Oct 27, 2021
@ahopkins ahopkins changed the title Add ability to log all exceptions Noisy exceptions - force logging of all exceptions Oct 27, 2021
ChihweiLHBird pushed a commit to ChihweiLHBird/sanic that referenced this pull request Jun 1, 2022
* Add ability to log all exceptions

* Fix linting 🙄

* Remove shorthand

* Make `ErrorHandler.log` backwards-compat

* Ignore mypy error

* Don't store `noisy_exceptions` attribute in app

* Added tests

* Store noisy exceptions setting in config

* Default to not-noisy if config key not available

* Add CLI tests for `noisy-exceptions`

* Remove debugging line I left in 😅

* Fix tests

Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Noisy exceptions
2 participants