Closed satya-alapati-einfochips closed 2 weeks ago
Without code or a reproducer, there's nothing we can do
TestUtils entry_points,
entry_points=
{
"pytest11": [
"config_parser = TestUtils.ScriptUtils.config_parser",
"logger_plugin = TestUtils.LoggerUtils.pytest_plugins.logger_plugin",
]
},
Appium entry_points,
entry_points=
{
"pytest11": [
"A_configparser = Appium.utilities.ScriptUtils.configuration_parser",
"A_loggerplugin = Appium.utilities.LoggerUtils.pytest_plugins.appium_logger_plugin",
]
},
Using pip installing TestUtils and Appium in E2E repo, In site-packages on E2E venv, I can see the entry points. _venv_E2E/Lib/site-packages/TestUtils-X.X.X.dist-info/entrypoints.txt,
[pytest11]
config_parser = TestUtils.ScriptUtils.config_parser
logger_plugin = TestUtils.LoggerUtils.pytest_plugins.logger_plugin
_venv_E2E/Lib/site-packages/Appium-X.X.X.dist-info/entrypoints.txt
[pytest11]
A_configparser = Appium.utilities.ScriptUtils.configuration_parser
A_loggerplugin = Appium.utilities.LoggerUtils.pytest_plugins.appium_logger_plugin
As per TestUtils config, logs should store in tests_info or tests_debug,
TESTS_INFO_LOG_NAME = "tests_info.log"
TESTS_DEBUG_LOG_NAME = "tests_debug.log"
in the same way, As per Appium config, logs should store in appium_logger info or debug,
TESTS_INFO_LOG_NAME = "appium_logger.info"
TESTS_DEBUG_LOG_NAME = "appium_logger.debug"
I have imported ONLY TestUtils logger obj in code,
from TestUtils.LoggerUtils.wearable_logger import logger
logger.info("-" * 30 + f'FOLLOWING TRACEBACK' + "-" * 30)
So logs should store in tests_info or tests_debug as TestUtils logger obj is used, BUT logs are getting stored in appium_logger which was not even imported or used in the code.
Hope this helps !
This issue is stale because it has the status: needs information
label and requested follow-up information was not provided for 14 days.
Issue is with my code, using same initialization value when initializing logger from both repos, so one is overriding other. Now with different initialization values, code is working as expected. Thank you!
My entry_points of multiple packages looks like this, P1 -
P2 -
Here p1plugin2 is logger module of P1, p2plugin2 is logger module of P2.
I want to import p1plugin2, log data using it's functionality. Same for p2plugin2 If I only have p1plugin2, logs are captured in P1 log files. BUT when I have p2plugin2, logs are by default storing in P2 log files irrespective of importing and using p1plugin2.
Even they both are logger modules, I have given different file names and key names in entry_points. Still seeing same issue,
Pip and pytest versions,
pip list
from the virtual environment you are using