picologging
picologging copied to clipboard
The module is not reported correctly on handled records
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.