Fixed bug in logging.py where messages were not being printed to stderr.
Also took the opportunity to port the print statments in logbook.py to
python3.