Oe2sSLE icon indicating copy to clipboard operation
Oe2sSLE copied to clipboard

Use more pythonic logging

Open rknLA opened this issue 8 years ago • 1 comments

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.

rknLA avatar May 02 '16 16:05 rknLA

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 to logging)?

JonathanTaquet avatar May 12 '16 20:05 JonathanTaquet