Import logging.
Move to py3k compatible code.