Skip to content
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

Change logging level of uncaught exceptions in actors to logging.INFO #73

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
2 participants
@stefanmohl
Copy link

commented Jun 13, 2017

Hy Jodal!

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:

import logging
logging.basicConfig()
logging.getLogger('pykka').setLevel(logging.INFO)

This has saved me from a lot of heartache once I figured it out!

@jodal jodal added this to the v1.3 milestone Jun 14, 2017

arnuschky added a commit to arnuschky/pykka that referenced this pull request Aug 30, 2017

arnuschky added a commit to arnuschky/pykka that referenced this pull request Aug 30, 2017

@jodal jodal self-assigned this Jan 26, 2019

@jodal jodal closed this in 21cc774 Jan 26, 2019

@jodal

This comment has been minimized.

Copy link
Owner

commented Jan 26, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.