picologging icon indicating copy to clipboard operation
picologging copied to clipboard

The module is not reported correctly on handled records

Open pamelafox opened this issue 2 years ago • 1 comments

I noticed this issue while working on the QueueHandler.

The following test succeeds with CPython logging but fails with picologging:

def test_queue_handler_dispatch():
    logger = picologging.Logger("test", picologging.DEBUG)
    q = queue.Queue()
    handler = QueueHandler(q)
    logger.addHandler(handler)
    logger.debug("test")
    record = q.get(block=False)
    assert record.module == "test_queuehandler"

In picologging, the module is reported as simply "python" instead. I haven't dug in yet to see where the problem is.

pamelafox avatar Oct 19 '22 05:10 pamelafox