reportportal / agent-Python-RobotFramework

Robot Framework integration for Report Portal
Apache License 2.0
59 stars 33 forks source link

robotframework-reportportal: Required LEVEL definition for report portal differ from robot #109

Closed doguz2509 closed 2 years ago

doguz2509 commented 3 years ago

Not relevant for target tests and extra information printed into RF report, when executing with levels DEBUG/TRACE

Describe the solution you'd like Option to define report-portal debug level separately from robot

HardNorth commented 2 years ago

@doguz2509 Well, this issue is nothing to do with ReportPortal. Our agent uses standard Python logging framework to log its own debug information, and Robot Framework intercepts everything what was logged by its handler and puts it in report. The very same Robot Framework does not provide a way of filtering report output leaving just --loglevel parameter to control verbosity. So why should we bother?

Luckily to you there is a way to mute our listeners, I added it in our examples. You can do that by setting higher level of logging to each of our module in runtime: https://github.com/reportportal/examples-python/blob/master/robotframework/robot/library/Log.py#L36

And then call that method from a common initialization point, E.G.: https://github.com/reportportal/examples-python/blob/master/robotframework/robot/__init__.robot#L3

That's how my log looked before: Screen Shot 2022-06-16 at 7 53 45 PM

And after: Screen Shot 2022-06-16 at 9 12 24 PM

Those request logs are related to urllib3 library, a common library for any HTTP request. You may loose your REST API logs if I mute them also.

doguz2509 commented 2 years ago

Thanks a lot Was helpfully 👍

16 июня 2022 г., в 21:15, Vadzim Hushchanskou @.***> написал(а):

 Closed #109 as completed.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.