{"action":"created","comment":{"url":"https://api.github.com/repos/ska-sa/katcp-python/pulls/comments/28047791","id":28047791,"diff_hunk":"@@ -2325,7 +2326,7 @@ def set_log_level(self, level):\n         \"\"\"\n         self._log_level = level\n         if self._python_logger:\n-            level = PYTHON_LEVEL.get(level)\n+            level = self.PYTHON_LEVEL.get(level)","path":"katcp/server.py","position":13,"original_position":13,"commit_id":"0636acac40801f356f795e3f92c9044b3d2c0ea0","original_commit_id":"0636acac40801f356f795e3f92c9044b3d2c0ea0","user":{"login":"theunsa","id":95486,"avatar_url":"https://avatars.githubusercontent.com/u/95486?v=3","gravatar_id":"","url":"https://api.github.com/users/theunsa","html_url":"https://github.com/theunsa","followers_url":"https://api.github.com/users/theunsa/followers","following_url":"https://api.github.com/users/theunsa/following{/other_user}","gists_url":"https://api.github.com/users/theunsa/gists{/gist_id}","starred_url":"https://api.github.com/users/theunsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theunsa/subscriptions","organizations_url":"https://api.github.com/users/theunsa/orgs","repos_url":"https://api.github.com/users/theunsa/repos","events_url":"https://api.github.com/users/theunsa/events{/privacy}","received_events_url":"https://api.github.com/users/theunsa/received_events","type":"User","site_admin":false},"body":"On second thought ... you could just index using [ ] and then catch the ValueError and report a more proper error message so that you know why KATCP blows up. That is how `def set_log_level_by_name(self, level_name)` does it.","created_at":"2015-04-09T09:36:07Z","updated_at":"2015-04-09T09:36:07Z","html_url":"https://github.com/ska-sa/katcp-python/pull/85#discussion_r28047791","pull_request_url":"https://api.github.com/repos/ska-sa/katcp-python/pulls/85","_links":{"self":{"href":"https://api.github.com/repos/ska-sa/katcp-python/pulls/comments/28047791"},"html":{"href":"https://github.com/ska-sa/katcp-python/pull/85#discussion_r28047791"},"pull_request":{"href":"https://api.github.com/repos/ska-sa/katcp-python/pulls/85"}}},"pull_request":{"url":"https://api.github.com/repos/ska-sa/katcp-python/pulls/85","id":32932987,"html_url":"https://github.com/ska-sa/katcp-python/pull/85","diff_url":"https://github.com/ska-sa/katcp-python/pull/85.diff","patch_url":"https://github.com/ska-sa/katcp-python/pull/85.patch","issue_url":"https://api.github.com/repos/ska-sa/katcp-python/issues/85","number":85,"state":"open","locked":false,"title":"Add off level","user":{"login":"bxaia","id":10397948,"avatar_url":"https://avatars.githubusercontent.com/u/10397948?v=3","gravatar_id":"","url":"https://api.github.com/users/bxaia","html_url":"https://github.com/bxaia","followers_url":"https://api.github.com/users/bxaia/followers","following_url":"https://api.github.com/users/bxaia/following{/other_user}","gists_url":"https://api.github.com/users/bxaia/gists{/gist_id}","starred_url":"https://api.github.com/users/bxaia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bxaia/subscriptions","organizations_url":"https://api.github.com/users/bxaia/orgs","repos_url":"https://api.github.com/users/bxaia/repos","events_url":"https://api.github.com/users/bxaia/events{/privacy}","received_events_url":"https://api.github.com/users/bxaia/received_events","type":"User","site_admin":false},"body":"@martinslabber please can you review and merge.\r\n\r\n- OFF is the highest possible logging level and is intended to turn logging off.\r\n  No information. Devices should never log messages directly to the OFF logging level.","created_at":"2015-04-09T08:01:13Z","updated_at":"2015-04-09T09:36:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d35e4b08bb2f75294d7388fc7897bf47ee8c0a99","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ska-sa/katcp-python/pulls/85/commits","review_comments_url":"https://api.github.com/repos/ska-sa/katcp-python/pulls/85/comments","review_comment_url":"https://api.github.com/repos/ska-sa/katcp-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ska-sa/katcp-python/issues/85/comments","statuses_url":"https://api.github.com/repos/ska-sa/katcp-python/statuses/0636acac40801f356f795e3f92c9044b3d2c0ea0","head":{"label":"ska-sa:add_OFF_level","ref":"add_OFF_level","sha":"0636acac40801f356f795e3f92c9044b3d2c0ea0","user":{"login":"ska-sa","id":1210238,"avatar_url":"https://avatars.githubusercontent.com/u/1210238?v=3","gravatar_id":"","url":"https://api.github.com/users/ska-sa","html_url":"https://github.com/ska-sa","followers_url":"https://api.github.com/users/ska-sa/followers","following_url":"https://api.github.com/users/ska-sa/following{/other_user}","gists_url":"https://api.github.com/users/ska-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/ska-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ska-sa/subscriptions","organizations_url":"https://api.github.com/users/ska-sa/orgs","repos_url":"https://api.github.com/users/ska-sa/repos","events_url":"https://api.github.com/users/ska-sa/events{/privacy}","received_events_url":"https://api.github.com/users/ska-sa/received_events","type":"Organization","site_admin":false},"repo":{"id":5854299,"name":"katcp-python","full_name":"ska-sa/katcp-python","owner":{"login":"ska-sa","id":1210238,"avatar_url":"https://avatars.githubusercontent.com/u/1210238?v=3","gravatar_id":"","url":"https://api.github.com/users/ska-sa","html_url":"https://github.com/ska-sa","followers_url":"https://api.github.com/users/ska-sa/followers","following_url":"https://api.github.com/users/ska-sa/following{/other_user}","gists_url":"https://api.github.com/users/ska-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/ska-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ska-sa/subscriptions","organizations_url":"https://api.github.com/users/ska-sa/orgs","repos_url":"https://api.github.com/users/ska-sa/repos","events_url":"https://api.github.com/users/ska-sa/events{/privacy}","received_events_url":"https://api.github.com/users/ska-sa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ska-sa/katcp-python","description":"Python client and server library for the Karoo Array Telescope Control Protocol (KATCP)","fork":false,"url":"https://api.github.com/repos/ska-sa/katcp-python","forks_url":"https://api.github.com/repos/ska-sa/katcp-python/forks","keys_url":"https://api.github.com/repos/ska-sa/katcp-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ska-sa/katcp-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ska-sa/katcp-python/teams","hooks_url":"https://api.github.com/repos/ska-sa/katcp-python/hooks","issue_events_url":"https://api.github.com/repos/ska-sa/katcp-python/issues/events{/number}","events_url":"https://api.github.com/repos/ska-sa/katcp-python/events","assignees_url":"https://api.github.com/repos/ska-sa/katcp-python/assignees{/user}","branches_url":"https://api.github.com/repos/ska-sa/katcp-python/branches{/branch}","tags_url":"https://api.github.com/repos/ska-sa/katcp-python/tags","blobs_url":"https://api.github.com/repos/ska-sa/katcp-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ska-sa/katcp-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ska-sa/katcp-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/ska-sa/katcp-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ska-sa/katcp-python/statuses/{sha}","languages_url":"https://api.github.com/repos/ska-sa/katcp-python/languages","stargazers_url":"https://api.github.com/repos/ska-sa/katcp-python/stargazers","contributors_url":"https://api.github.com/repos/ska-sa/katcp-python/contributors","subscribers_url":"https://api.github.com/repos/ska-sa/katcp-python/subscribers","subscription_url":"https://api.github.com/repos/ska-sa/katcp-python/subscription","commits_url":"https://api.github.com/repos/ska-sa/katcp-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/ska-sa/katcp-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/ska-sa/katcp-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/ska-sa/katcp-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/ska-sa/katcp-python/contents/{+path}","compare_url":"https://api.github.com/repos/ska-sa/katcp-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ska-sa/katcp-python/merges","archive_url":"https://api.github.com/repos/ska-sa/katcp-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ska-sa/katcp-python/downloads","issues_url":"https://api.github.com/repos/ska-sa/katcp-python/issues{/number}","pulls_url":"https://api.github.com/repos/ska-sa/katcp-python/pulls{/number}","milestones_url":"https://api.github.com/repos/ska-sa/katcp-python/milestones{/number}","notifications_url":"https://api.github.com/repos/ska-sa/katcp-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ska-sa/katcp-python/labels{/name}","releases_url":"https://api.github.com/repos/ska-sa/katcp-python/releases{/id}","created_at":"2012-09-18T09:52:58Z","updated_at":"2015-04-09T07:44:05Z","pushed_at":"2015-04-09T08:51:19Z","git_url":"git://github.com/ska-sa/katcp-python.git","ssh_url":"git@github.com:ska-sa/katcp-python.git","clone_url":"https://github.com/ska-sa/katcp-python.git","svn_url":"https://github.com/ska-sa/katcp-python","homepage":null,"size":3381,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"ska-sa:master","ref":"master","sha":"80ce80e29a49ef0c0cb68f9d1deae4e3bbab4f12","user":{"login":"ska-sa","id":1210238,"avatar_url":"https://avatars.githubusercontent.com/u/1210238?v=3","gravatar_id":"","url":"https://api.github.com/users/ska-sa","html_url":"https://github.com/ska-sa","followers_url":"https://api.github.com/users/ska-sa/followers","following_url":"https://api.github.com/users/ska-sa/following{/other_user}","gists_url":"https://api.github.com/users/ska-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/ska-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ska-sa/subscriptions","organizations_url":"https://api.github.com/users/ska-sa/orgs","repos_url":"https://api.github.com/users/ska-sa/repos","events_url":"https://api.github.com/users/ska-sa/events{/privacy}","received_events_url":"https://api.github.com/users/ska-sa/received_events","type":"Organization","site_admin":false},"repo":{"id":5854299,"name":"katcp-python","full_name":"ska-sa/katcp-python","owner":{"login":"ska-sa","id":1210238,"avatar_url":"https://avatars.githubusercontent.com/u/1210238?v=3","gravatar_id":"","url":"https://api.github.com/users/ska-sa","html_url":"https://github.com/ska-sa","followers_url":"https://api.github.com/users/ska-sa/followers","following_url":"https://api.github.com/users/ska-sa/following{/other_user}","gists_url":"https://api.github.com/users/ska-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/ska-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ska-sa/subscriptions","organizations_url":"https://api.github.com/users/ska-sa/orgs","repos_url":"https://api.github.com/users/ska-sa/repos","events_url":"https://api.github.com/users/ska-sa/events{/privacy}","received_events_url":"https://api.github.com/users/ska-sa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ska-sa/katcp-python","description":"Python client and server library for the Karoo Array Telescope Control Protocol (KATCP)","fork":false,"url":"https://api.github.com/repos/ska-sa/katcp-python","forks_url":"https://api.github.com/repos/ska-sa/katcp-python/forks","keys_url":"https://api.github.com/repos/ska-sa/katcp-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ska-sa/katcp-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ska-sa/katcp-python/teams","hooks_url":"https://api.github.com/repos/ska-sa/katcp-python/hooks","issue_events_url":"https://api.github.com/repos/ska-sa/katcp-python/issues/events{/number}","events_url":"https://api.github.com/repos/ska-sa/katcp-python/events","assignees_url":"https://api.github.com/repos/ska-sa/katcp-python/assignees{/user}","branches_url":"https://api.github.com/repos/ska-sa/katcp-python/branches{/branch}","tags_url":"https://api.github.com/repos/ska-sa/katcp-python/tags","blobs_url":"https://api.github.com/repos/ska-sa/katcp-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ska-sa/katcp-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ska-sa/katcp-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/ska-sa/katcp-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ska-sa/katcp-python/statuses/{sha}","languages_url":"https://api.github.com/repos/ska-sa/katcp-python/languages","stargazers_url":"https://api.github.com/repos/ska-sa/katcp-python/stargazers","contributors_url":"https://api.github.com/repos/ska-sa/katcp-python/contributors","subscribers_url":"https://api.github.com/repos/ska-sa/katcp-python/subscribers","subscription_url":"https://api.github.com/repos/ska-sa/katcp-python/subscription","commits_url":"https://api.github.com/repos/ska-sa/katcp-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/ska-sa/katcp-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/ska-sa/katcp-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/ska-sa/katcp-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/ska-sa/katcp-python/contents/{+path}","compare_url":"https://api.github.com/repos/ska-sa/katcp-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ska-sa/katcp-python/merges","archive_url":"https://api.github.com/repos/ska-sa/katcp-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ska-sa/katcp-python/downloads","issues_url":"https://api.github.com/repos/ska-sa/katcp-python/issues{/number}","pulls_url":"https://api.github.com/repos/ska-sa/katcp-python/pulls{/number}","milestones_url":"https://api.github.com/repos/ska-sa/katcp-python/milestones{/number}","notifications_url":"https://api.github.com/repos/ska-sa/katcp-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ska-sa/katcp-python/labels{/name}","releases_url":"https://api.github.com/repos/ska-sa/katcp-python/releases{/id}","created_at":"2012-09-18T09:52:58Z","updated_at":"2015-04-09T07:44:05Z","pushed_at":"2015-04-09T08:51:19Z","git_url":"git://github.com/ska-sa/katcp-python.git","ssh_url":"git@github.com:ska-sa/katcp-python.git","clone_url":"https://github.com/ska-sa/katcp-python.git","svn_url":"https://github.com/ska-sa/katcp-python","homepage":null,"size":3381,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ska-sa/katcp-python/pulls/85"},"html":{"href":"https://github.com/ska-sa/katcp-python/pull/85"},"issue":{"href":"https://api.github.com/repos/ska-sa/katcp-python/issues/85"},"comments":{"href":"https://api.github.com/repos/ska-sa/katcp-python/issues/85/comments"},"review_comments":{"href":"https://api.github.com/repos/ska-sa/katcp-python/pulls/85/comments"},"review_comment":{"href":"https://api.github.com/repos/ska-sa/katcp-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ska-sa/katcp-python/pulls/85/commits"},"statuses":{"href":"https://api.github.com/repos/ska-sa/katcp-python/statuses/0636acac40801f356f795e3f92c9044b3d2c0ea0"}}}}