Exception logging
See original GitHub issueHi! I’m finally catching up to upgrading to graphene 2.0. A lot of code churn, but there are some nice improvements.
My main complaint at the moment is the noisy logging of graphql errors on execution. I can’t find what is logging this to work out how to disable it. Especially in a test suite which is designed to catch errors and verify the messages they have raised, printing a traceback on every test is very unhelpful! I have logging disabled to CRITICAL
level when running my test suite.
I’m not sure if this is an issue in Graphene, Graphql core, or graphene-django but I can’t find any obvious logging config or stdout writing in any of the projects which would cause it.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Logging Exceptions in Java - Loggly
Logging is an essential component of any application, especially when a critical error occurs. Whether or not you recover from an exception, ...
Read more >How to log exceptions in Java? - Stack Overflow
Most code I've seen logs an exception by using either getMessage() or toString() . But these methods don't always capture all the information ......
Read more >How to Log Exception Properly - Medium
Best Practice: Log the exception object. log.error("Hello again", ex);. By logging the developer message together with the whole exception ...
Read more >logging — Logging facility for Python — Python 3.11.1 ...
Logs a message with level ERROR on this logger. The arguments are interpreted as for debug() . Exception info is added to the...
Read more >A New Pattern for Exception Logging - Stephen Cleary
So, let's talk about logging exceptions. Most methods do not log their own exceptions; any exceptions are propagated out of the method, possibly ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One suggestion I’d make is… at least in development mode for graphene-django, when there’s an exception, rather than catching it within the promise executer, and handling it… instead simply throw an exception.
As it is right now, I have to manually set a debugger point within Graphene to catch exceptions before they’re handled by the framework.
Ah ha! Thanks @charettes. I hadn’t heard of
sys.excepthook
so didn’t know where to look. Should be fixed in the next release ofgraphql-core
.