def METHOD_NAME(log, message, user_input):
    devices = []
    message += "=" * 80
    message += "\n"
    try:
        if user_input is not None:
            message += "**User input:**\n"
            message, devices = _unpack_input(user_input, 1, devices, message)
            message += "\n"
        if devices:
            message += "**Involved devices:**\n\n"
            for device in devices:
                message += repr(device)
                message += "\n"
    except Exception as e:  # pylint: disable=broad-except
        # really don't want to crash because of a logging issue
        log.debug("Logging failed: %s", str(e))
    else:
        log.debug(message)