kquick / Thespian

Python Actor concurrency library
MIT License
190 stars 24 forks source link

Make Thespian's internal logging threshold configurable #24

Closed danielmitterdorfer closed 6 years ago

danielmitterdorfer commented 6 years ago

With this commit, Thespian recognizes a new environment variable THESPLOG_THRESHOLD to configure the minimum log level which is written to Thespian's internal log file. The default value, logging.WARNING, stays as is.

We also log deserialization error on ERROR level.

Closes #23

danielmitterdorfer commented 6 years ago

A note on _name_to_level in utilitis.py: Although the logging module contains a similar dictionary I did not use it as it is considered an implementation detail and not part of the official API.

danielmitterdorfer commented 6 years ago

I had a look at the build failure in https://travis-ci.org/kquick/Thespian/builds/379058936. The Python 3.6 build failed with:

in test_threadedActor.py

_____________ ERROR at setup of test_threads[multiprocTCPBase-100] _____________
E           thespian.actors.InvalidActorAddress: ActorAddr-(T|:24252) is not a valid ActorSystem admin

It looks unrelated to my PR to me.

kquick commented 6 years ago

Yes, that's unrelated. Occasionally there are port collisions between the ports chosen by the test code and something that is already using the port.

kquick commented 6 years ago

This looks great. Thanks, Daniel. I'll get this incorporated into a release by the end of next week. -Kevin

danielmitterdorfer commented 6 years ago

Thanks Kevin!