def test_emit_ok(handler, framework):
    logger = txaio.make_logger()

    old_log = txaio.get_global_log_level()
    txaio.set_global_log_level("trace")

    logger.emit("trace", "foobar")
    logger.emit("info", "barbaz")

    txaio.set_global_log_level(old_log)

    assert len(handler.messages) == 2
    assert handler.messages[0].endswith(b"foobar")
    assert handler.messages[1].endswith(b"barbaz")
emit() with an OK level emits the message.
dataset/ETHPy150Open crossbario/txaio/test/test_logging.py/test_emit_ok