Log exceptions instead of printing a traceback to stderr.

def excepthook(type, value, traceback):  # pylint: disable=unused-argument
    """Log exceptions instead of printing a traceback to stderr."""
    try:
        six.reraise(type, value, traceback)
    except type:
        _LOGGER.exception(str(value))
    if isinstance(value, KeyboardInterrupt):
        message = "Cancelling at the user's request."
    else:
        message = handle_unexpected_exception(value)
    print(message, file=sys.stderr)