-
Notifications
You must be signed in to change notification settings - Fork 131
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 exceptions #73
Log exceptions #73
Conversation
seems to work, minus some quoting issues
would be great if we could log the stack trace as well though |
here's how to also print stacktrace:
output:
|
+1 |
This patch is definitely needed. Please merge it ASAP. |
Actually since dfa272e exceptions should already be logged. Is any of you using a custom logging configuration? If so, can I see it? |
Actually just passing @jtyr can I have your logging config? I see exceptions properly logged without this patch applied. |
I'm using this patch for logging:
Apart of this patch, I'm using no extra logging setting. |
I just reverted the merge. From a clean install from master, I'd be interested to see a case where exceptions are not logged. |
I think you have confused exceptions and their stacktraces. My PR adds logging exceptions, and @Dieterbe's PR adds logging exceptions with stacktraces. |
No, I am already seeing exceptions with stacktraces in my logs. This has been the case since dfa272e. |
Well, I did not see any exceptions in the log (stdout from gunicorn - see https://github.com/picotrading/ansible-graphite_api/blob/master/contrib/graphite-api.sh#L25) without the patch I sent above when I was testing it like 2 months ago. So I'm sure the functionality provided by the commit dfa272e did not work for me. |
The issue is, I'm unable to reproduce a setup that hides exceptions… I'd love to see this issue happen in a reproduceable way. |
If you want to make the exception logging optional, you should allow to set the logging level. The exceptions are logged only in the "error" log level. Or change the log level for exception to "debug". |
@brutasse can you share your config? i've been trying master with various config settings (debug vs warn, propagate true vs false, disable_existing_loggers true/false, version 1 or removing the line, with and without sentry_dsn line, templates/cache/statsd settings on/of, etc) and every time i request i run like so:
|
since Bruno commented higher up
same result, http 500 but no exception |
I run gunicorn like this:
So basically redirect the STDOUT/STDERR into a file. And my
|
Any further comments on this issue? Any example how to setup logging which would show exceptions with stacktrace? It only works for me when using the above patch (#73 (comment)). |
Fixes #22