-
Notifications
You must be signed in to change notification settings - Fork 93
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
use standard logging #303
Comments
I think that instructions are a legacy of whipper's origin: morituri (and early versions of whipper) didn't use the Python |
Sounds good to me if we can get rid of the flog dependency. |
@anarcat 👌 |
/remind me "to review this issue" in 12 hours |
@JoeLametta set a reminder for Nov 11th 2018 |
🎉 |
whipper currently writes its error messages and output all jumbled up together on stdout, through the
Program._stdout
file handler. This is useful because it could allow some tests to parse the output of the program and verify things are working okay. That is not currently being used however, so it's unclear to me why this construct is present at all - the only test I could find that would use something like thisTestAccurateRipReport
and it directly hijackssys.stdout
and does not touch directly theProgram._stdout
handler.So I would recommend switching to using the logging module. It's standard, well known and expected in Python programs. As a bonus, all messages will be written on stderr (as they should). logfile, syslog and other handlers support becomes trivial to implement as well. The conversion should be easy: just change:
to:
or:
Depending on the severity level.
How does that sound?
The text was updated successfully, but these errors were encountered: