How can I prevent the logging of all keywords except Log keyword in robot framework?

走远了吗. 提交于 2019-12-24 03:41:10

问题


I am a beginner in robot framework. I want the log file of my robot test to contain the logs for only the log keyword. I tried to use removekeyword all. But It removed all keywords.

When I dont use the removekeyword, My log becomes messy

How can I log only the keyword-Log to my file? Also, How can I log the value of ${resp.status_code} in the log, instead of it being showed as a text in the above screenshot? Log to console is printing the value in console, but when I use Log, I am seeing it as the variable itself.

Edit: What I want is

Keyword When I post a post Request
           -keyword Log value of{resp_status code}
           -keyword Log ****************************
Keyword THEN verify status code is 200
           -keyword Log status code is 200

I don't want any other logs to show up other than the log keyword

来源:https://stackoverflow.com/questions/53627817/how-can-i-prevent-the-logging-of-all-keywords-except-log-keyword-in-robot-framew

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!