{"action":"created","issue":{"url":"https://api.github.com/repos/robotframework/robotframework/issues/1916","labels_url":"https://api.github.com/repos/robotframework/robotframework/issues/1916/labels{/name}","comments_url":"https://api.github.com/repos/robotframework/robotframework/issues/1916/comments","events_url":"https://api.github.com/repos/robotframework/robotframework/issues/1916/events","html_url":"https://github.com/robotframework/robotframework/issues/1916","id":57190174,"number":1916,"title":"Expose `ERROR` log level to custom libraries","user":{"login":"jaloren","id":6081083,"avatar_url":"https://avatars.githubusercontent.com/u/6081083?v=3","gravatar_id":"","url":"https://api.github.com/users/jaloren","html_url":"https://github.com/jaloren","followers_url":"https://api.github.com/users/jaloren/followers","following_url":"https://api.github.com/users/jaloren/following{/other_user}","gists_url":"https://api.github.com/users/jaloren/gists{/gist_id}","starred_url":"https://api.github.com/users/jaloren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaloren/subscriptions","organizations_url":"https://api.github.com/users/jaloren/orgs","repos_url":"https://api.github.com/users/jaloren/repos","events_url":"https://api.github.com/users/jaloren/events{/privacy}","received_events_url":"https://api.github.com/users/jaloren/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/robotframework/robotframework/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/robotframework/robotframework/labels/prio-medium","name":"prio-medium","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/robotframework/robotframework/milestones/16","html_url":"https://github.com/robotframework/robotframework/milestones/2.9","labels_url":"https://api.github.com/repos/robotframework/robotframework/milestones/16/labels","id":705012,"number":16,"title":"2.9","description":null,"creator":{"login":"spooning","id":1658993,"avatar_url":"https://avatars.githubusercontent.com/u/1658993?v=3","gravatar_id":"","url":"https://api.github.com/users/spooning","html_url":"https://github.com/spooning","followers_url":"https://api.github.com/users/spooning/followers","following_url":"https://api.github.com/users/spooning/following{/other_user}","gists_url":"https://api.github.com/users/spooning/gists{/gist_id}","starred_url":"https://api.github.com/users/spooning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spooning/subscriptions","organizations_url":"https://api.github.com/users/spooning/orgs","repos_url":"https://api.github.com/users/spooning/repos","events_url":"https://api.github.com/users/spooning/events{/privacy}","received_events_url":"https://api.github.com/users/spooning/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":39,"state":"open","created_at":"2014-06-29T21:43:00Z","updated_at":"2015-05-10T12:03:21Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2015-02-10T15:34:08Z","updated_at":"2015-05-10T18:49:12Z","closed_at":null,"body":"Here's the supported log levels in the logging api for robot: TRACE, DEBUG, INFO and WARN.\r\n\r\nWhile there is no rule, it is a common convention to distinguish between a event that indicates something unexpected happened that could indicate a problem (WARNING) versus an event that is a serious problem that resulted in the failure of an operation (ERROR). For example, the official python documentation about the logging module and log4j make this distinction.\r\n\r\nI believe that most engineers share this understanding and would treat events logged at ERROR differently then at warning. Consequently, I think it would be a good feature to support the ability to log at the ERROR log level in both test cases and custom libraries. The purpose would be to indicate that a serious problem has occurred that resulted in a failure. "},"comment":{"url":"https://api.github.com/repos/robotframework/robotframework/issues/comments/100679984","html_url":"https://github.com/robotframework/robotframework/issues/1916#issuecomment-100679984","issue_url":"https://api.github.com/repos/robotframework/robotframework/issues/1916","id":100679984,"user":{"login":"jaloren","id":6081083,"avatar_url":"https://avatars.githubusercontent.com/u/6081083?v=3","gravatar_id":"","url":"https://api.github.com/users/jaloren","html_url":"https://github.com/jaloren","followers_url":"https://api.github.com/users/jaloren/followers","following_url":"https://api.github.com/users/jaloren/following{/other_user}","gists_url":"https://api.github.com/users/jaloren/gists{/gist_id}","starred_url":"https://api.github.com/users/jaloren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaloren/subscriptions","organizations_url":"https://api.github.com/users/jaloren/orgs","repos_url":"https://api.github.com/users/jaloren/repos","events_url":"https://api.github.com/users/jaloren/events{/privacy}","received_events_url":"https://api.github.com/users/jaloren/received_events","type":"User","site_admin":false},"created_at":"2015-05-10T18:49:12Z","updated_at":"2015-05-10T18:49:12Z","body":"@pekkaklarck I believe I have implemented changes for points (1) and (2) except for the fact that the actual report being generated does not show the keyword linking for error log levels like it does for warn. So clearly I am missing something. :) \r\n\r\nNote I am using the builtin log keyword to test this -- I am assuming that should not be a problem.\r\n\r\nWhen I looked through through the jsmodelbuilders.py and jsbuildingcontext.py, the only place where I could see the linking being done is MessageBuilder.build function. So that's where I added the simple if block like so. And yet its still not working. \r\n\r\nI'll pop into the IRC robotframework channel this week...I suspect it would just be easier if we chatted.\r\n \r\n```python\r\n   def build(self, msg):\r\n        if msg.level == 'WARN':\r\n            self._context.create_link_target(msg)\r\n\tif msg.level == 'ERROR':\r\n             self._context.create_link_target(msg)\r\n\tself._context.message_level(msg.level)\r\n        return self._build(msg)\r\n```"}}