-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Log traceback if exceptions are ignored #613
Conversation
django_redis/cache.py
Outdated
@@ -32,7 +32,7 @@ def _decorator(self, *args, **kwargs): | |||
except ConnectionInterrupted as e: | |||
if self._ignore_exceptions: | |||
if self._log_ignored_exceptions: | |||
self.logger.error(str(e)) | |||
self.logger.exception(str(e)) |
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 a nice message? when you use exception you do not need to provide the exception but just a message, thew exception is printed afterwards
Codecov Report
@@ Coverage Diff @@
## master #613 +/- ##
=========================================
+ Coverage 57.8% 83.3% +25.6%
=========================================
Files 39 21 -18
Lines 2497 1043 -1454
Branches 71 0 -71
=========================================
- Hits 1441 868 -573
+ Misses 1041 175 -866
+ Partials 15 0 -15
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@WisdomPill codecov is complaining that the patch isn't covered with tests, so I'll add some that verify that the full traceback was logged. I'm not sure the mypy failure is related to this PR, though. |
@WisdomPill Do you mind taking another look at the PR? |
sorry for being late, and very much thank you for the contribution |
Fixes #611