Closed borislitvinov closed 2 years ago
@borislitvinov Yes, this is a known limitation of Python at all. There is no way to track parent / child thread. Actually, the whole threading model is neglected in the language. So just don't use threads, use processes if you need multi-threading in Python, this is Python's official answer: https://docs.python.org/3.7/glossary.html#term-global-interpreter-lock
@borislitvinov Implemented a possible workaround in our examples: https://github.com/reportportal/examples-python/blob/master/pytest/tests/test_thread_logging.py
Sorry, I couldn't invent anything but passing the logger explicitly in function parameters.
@HardNorth Thanks for the WA you have provided .
@HardNorth I have been working on a PR to add support for this use case. It's disabled by default and only enabled by usage of a dedicated flag. Please take a look at the PR: https://github.com/reportportal/agent-python-pytest/pull/320
Describe the bug It seems like all log messages sent from function wrapped by threading.Thread fails to reach the RP
Steps to Reproduce
Expected behavior all the messages should exist in RP
Actual behavior The message from "worker" can be seen in pytest's cli log , but not in RP
Package versions pytest-reportportal 5.1.1 reportportal-client 5.2.2
Additional context Add any other context about the problem here.