question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception logging

See original GitHub issue

Hi! 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:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
KaySackeycommented, Jan 12, 2018

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.

3reactions
mjtamlyncommented, Jan 22, 2018

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 of graphql-core.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found