Oe2sSLE
Oe2sSLE copied to clipboard
Use more pythonic logging
I went ahead and changed up the logging here to use Python's built-in logging
module, rather than redirecting stdin and stdout. While this might seem pedantic, the main reason I had to do this was because redirecting stdout makes pdb
effectively useless, making it impossible to debug what's going on with the issue I've mentioned in #2.
At this point, I'm still trying to pinpoint where things are going wrong, but I thought this might be helpful to merge back into your branch.
I'm happy to remove the added log messages as well, if you prefer.
Thank you for your work.
I have comments/questions:
- Is it possible and simple to show your log messages only in a verbose mode?
- The reason why I used such logging method was for executable releases (not launched from a terminal). With the
logging
module some messages (like the ones coming from pyaudio errors when reading samples with too high sampling frequency) are lost. Is it possible to intercept them efficiently (maybe using stdout/stderr redirection tologging
)?