reportportal / agent-Python-RobotFramework

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

Robot's Error and Warning logs are not recognized by listener #20

Closed rkumarrb closed 6 years ago

rkumarrb commented 6 years ago

I'm getting below warning when I log error or warning with robot framework and add listener to report portal.

Calling method 'log_message' of listener 'robotframework_reportportal.listener' failed: KeyError: 'WARN'

Calling method 'log_message' of listener 'robotframework_reportportal.listener' failed: KeyError: 'ERROR'

rkumarrb commented 6 years ago

We need to add warn and error keys in log_level_mapping dictionary in service.py file like below

log_level_mapping = { "INFO": "INFO", "FAIL": "ERROR", "TRACE": "TRACE", "DEBUG": "DEBUG", "HTML": "INFO", "WARN": "WARN", "ERROR": "ERROR" }

I thought of create fix and raise pull request as you are already working could you please consider this. Thank you.

merlynsoanss commented 6 years ago

Faced the same issue. Fix works for me.. Thank you. PATH : C:\Python27\Lib\site-packages\robotframework_reportportal\service.py

ch-t commented 6 years ago

fixed in #28