async def METHOD_NAME(host):
    try:
        reader, writer = await async_open_connection(
            host,
            1380,
            after_idle=1,
            interval=1,
            max_fails=3,
        )
        writer.write(b"ARTIQ management\n")
        endian = await reader.readexactly(1)
        if endian == b"e":
            endian = "<"
        elif endian == b"E":
            endian = ">"
        else:
            raise IOError("Incorrect reply from device: expected e/E.")
        writer.write(struct.pack("B", Request.PullLog.value))
        await writer.drain()
        while True:
            length, = struct.unpack(endian + "l", await reader.readexactly(4))
            log = await reader.readexactly(length)
            for line in log.decode("utf-8").splitlines():
                m = re.match(r"^\[.+?\] (TRACE|DEBUG| INFO| WARN|ERROR)\((.+?)\): (.+)$", line)
                levelname = m.group(1)
                if levelname == 'TRACE':
                    level = logging.TRACE
                elif levelname == 'DEBUG':
                    level = logging.DEBUG
                elif levelname == ' INFO':
                    level = logging.INFO
                elif levelname == ' WARN':
                    level = logging.WARN
                elif levelname == 'ERROR':
                    level = logging.ERROR
                name = 'firmware.' + m.group(2).replace('::', '.')
                text = m.group(3)
                log_with_name(name, level, text)
    except asyncio.CancelledError:
        raise
    except:
        logger.error("Logging connection terminating with exception", exc_info=True)