Move print calls to logging module

Python has a "logging" module. This commit migrates all the `print`
function calls over to it.