FLiT
FLiT copied to clipboard
Python printing in bisect to go through the logging module
Maybe not all printing should go through the logging module, but we have this situation that every message we print to the console, we are doing either the exact same message or a very similar message to the bisect log file. This unnecessarily bloats the code and makes it harder to read. Furthermore, it is difficult that the two are not the same in some places, which may be confusing to users.
I believe there is a way to do printing to the console using a separate handler in the logging module. We would not need to print out everything that goes to the log, but we can at least have the messages in sync. It would also then be trivial to add a --debug
flag to print out more information, that we are already generating for the log file. This would have the effect of simplifying the code, and making the log file and console output match exactly (i.e. consistency).