Skip to content

Conversation

@aminalaee
Copy link
Contributor

Related to: #124

import queue

import picologging
from picologging.handlers import QueueHandler, QueueListener

logger = picologging.Logger("test", picologging.DEBUG)
q = queue.Queue()
handler = QueueHandler(q)
logger.addHandler(handler)
logger.debug("test")
logger.debug("test")
q.get(block=False)
record = q.get(block=False)

print(record.filename)
print(record.module)

This reports <uknown> module and filename but with this PR we can use PyEval_GetFrame frame.

@aminalaee aminalaee marked this pull request as draft September 28, 2023 15:07
@aminalaee aminalaee changed the title Change Logger frame objects WIP: Change Logger frame objects Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant