Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Change logging level of uncaught exceptions in actors to logging.INFO #73
I have been battling with the problem of uncaught exceptions in the future proxy, and the silent fail that this often results in. It is a real problem to me, since it often results in very strange bugs as a result of simple syntax errors. I haven't been able to figure out a good solution (i.e. a suitable error handling framework for Actors in an OO setting), however at least I have a simple mitigation:
Change the log level in actor.py:203 from logging.DEBUG to logging.INFO.
The point is that log level INFO isn't used anywhere else in pykka, so this allows you to set the logging level of the pykka module below the chatty DEBUG level, to a level that only logs uncaught exceptions (i.e. usually it will log nothing in pykka, unless an uncaught exception is thrown in an actor). The levels WARNING and ERROR can remain for internal problems in the pykka framework.
I would suggest that you add at a prominent place a recommendation in the documentation:
This has saved me from a lot of heartache once I figured it out!
Thank you for the suggestion! Once I started mapping out and documenting how Pykka uses log levels (see https://www.pykka.org/en/develop/api/logging/#log-levels), this suggestion made even more sense.
Due to recent modernizations of the test suite, I had to reimplement your change, but it is basically exactly what you suggested here.