use python logging module for messages instead of print()

So... why are you passing around a ``logger`` object? Normally, I'd call ``logging.getLogger`` in every module, leaving it as a global. It keeps function declarations cleaner, and also logging messages would reflect where the code is (since the log line includes information from the module name if you use ``logging.getLogger(__name__)``).