{"action":"closed","number":21,"pull_request":{"url":"https://api.github.com/repos/stratosinc/pygatt/pulls/21","id":43342813,"html_url":"https://github.com/stratosinc/pygatt/pull/21","diff_url":"https://github.com/stratosinc/pygatt/pull/21.diff","patch_url":"https://github.com/stratosinc/pygatt/pull/21.patch","issue_url":"https://api.github.com/repos/stratosinc/pygatt/issues/21","number":21,"state":"closed","locked":false,"title":"Optimize logging","user":{"login":"peplin","id":184212,"avatar_url":"https://avatars.githubusercontent.com/u/184212?v=3","gravatar_id":"","url":"https://api.github.com/users/peplin","html_url":"https://github.com/peplin","followers_url":"https://api.github.com/users/peplin/followers","following_url":"https://api.github.com/users/peplin/following{/other_user}","gists_url":"https://api.github.com/users/peplin/gists{/gist_id}","starred_url":"https://api.github.com/users/peplin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peplin/subscriptions","organizations_url":"https://api.github.com/users/peplin/orgs","repos_url":"https://api.github.com/users/peplin/repos","events_url":"https://api.github.com/users/peplin/events{/privacy}","received_events_url":"https://api.github.com/users/peplin/received_events","type":"User","site_admin":false},"body":"The goal of this PR is to streamline how logging is done in pygatt to avoid duplication and minimize noise that doesn't add much value to understanding the operation of the system. In order to accomplish that, I had to do some refactoring of the backend BGLIB data structures. The overall diff is fairly large, but if you follow along with the commits I hope the thought process is clear.\r\n\r\nThis PR removes almost 1000 lines of code, so I think it's going to help a lot with testing and maintainability in the future.","created_at":"2015-08-25T22:07:49Z","updated_at":"2015-08-26T21:43:49Z","closed_at":"2015-08-26T21:43:48Z","merged_at":"2015-08-26T21:43:48Z","merge_commit_sha":"e5584c53f16186961dd381f954ea19ff3b054f34","assignee":{"login":"sloboste","id":5903252,"avatar_url":"https://avatars.githubusercontent.com/u/5903252?v=3","gravatar_id":"","url":"https://api.github.com/users/sloboste","html_url":"https://github.com/sloboste","followers_url":"https://api.github.com/users/sloboste/followers","following_url":"https://api.github.com/users/sloboste/following{/other_user}","gists_url":"https://api.github.com/users/sloboste/gists{/gist_id}","starred_url":"https://api.github.com/users/sloboste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloboste/subscriptions","organizations_url":"https://api.github.com/users/sloboste/orgs","repos_url":"https://api.github.com/users/sloboste/repos","events_url":"https://api.github.com/users/sloboste/events{/privacy}","received_events_url":"https://api.github.com/users/sloboste/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/stratosinc/pygatt/pulls/21/commits","review_comments_url":"https://api.github.com/repos/stratosinc/pygatt/pulls/21/comments","review_comment_url":"https://api.github.com/repos/stratosinc/pygatt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stratosinc/pygatt/issues/21/comments","statuses_url":"https://api.github.com/repos/stratosinc/pygatt/statuses/13a0e8b287759457a3a903e1ff1ddd4d7c351be5","head":{"label":"stratosinc:optimize-logging","ref":"optimize-logging","sha":"13a0e8b287759457a3a903e1ff1ddd4d7c351be5","user":{"login":"stratosinc","id":5115139,"avatar_url":"https://avatars.githubusercontent.com/u/5115139?v=3","gravatar_id":"","url":"https://api.github.com/users/stratosinc","html_url":"https://github.com/stratosinc","followers_url":"https://api.github.com/users/stratosinc/followers","following_url":"https://api.github.com/users/stratosinc/following{/other_user}","gists_url":"https://api.github.com/users/stratosinc/gists{/gist_id}","starred_url":"https://api.github.com/users/stratosinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stratosinc/subscriptions","organizations_url":"https://api.github.com/users/stratosinc/orgs","repos_url":"https://api.github.com/users/stratosinc/repos","events_url":"https://api.github.com/users/stratosinc/events{/privacy}","received_events_url":"https://api.github.com/users/stratosinc/received_events","type":"Organization","site_admin":false},"repo":{"id":19384977,"name":"pygatt","full_name":"stratosinc/pygatt","owner":{"login":"stratosinc","id":5115139,"avatar_url":"https://avatars.githubusercontent.com/u/5115139?v=3","gravatar_id":"","url":"https://api.github.com/users/stratosinc","html_url":"https://github.com/stratosinc","followers_url":"https://api.github.com/users/stratosinc/followers","following_url":"https://api.github.com/users/stratosinc/following{/other_user}","gists_url":"https://api.github.com/users/stratosinc/gists{/gist_id}","starred_url":"https://api.github.com/users/stratosinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stratosinc/subscriptions","organizations_url":"https://api.github.com/users/stratosinc/orgs","repos_url":"https://api.github.com/users/stratosinc/repos","events_url":"https://api.github.com/users/stratosinc/events{/privacy}","received_events_url":"https://api.github.com/users/stratosinc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stratosinc/pygatt","description":"Python wrapper for gatttool from BlueZ to access Bluetooth LE Devices","fork":true,"url":"https://api.github.com/repos/stratosinc/pygatt","forks_url":"https://api.github.com/repos/stratosinc/pygatt/forks","keys_url":"https://api.github.com/repos/stratosinc/pygatt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stratosinc/pygatt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stratosinc/pygatt/teams","hooks_url":"https://api.github.com/repos/stratosinc/pygatt/hooks","issue_events_url":"https://api.github.com/repos/stratosinc/pygatt/issues/events{/number}","events_url":"https://api.github.com/repos/stratosinc/pygatt/events","assignees_url":"https://api.github.com/repos/stratosinc/pygatt/assignees{/user}","branches_url":"https://api.github.com/repos/stratosinc/pygatt/branches{/branch}","tags_url":"https://api.github.com/repos/stratosinc/pygatt/tags","blobs_url":"https://api.github.com/repos/stratosinc/pygatt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stratosinc/pygatt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stratosinc/pygatt/git/refs{/sha}","trees_url":"https://api.github.com/repos/stratosinc/pygatt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stratosinc/pygatt/statuses/{sha}","languages_url":"https://api.github.com/repos/stratosinc/pygatt/languages","stargazers_url":"https://api.github.com/repos/stratosinc/pygatt/stargazers","contributors_url":"https://api.github.com/repos/stratosinc/pygatt/contributors","subscribers_url":"https://api.github.com/repos/stratosinc/pygatt/subscribers","subscription_url":"https://api.github.com/repos/stratosinc/pygatt/subscription","commits_url":"https://api.github.com/repos/stratosinc/pygatt/commits{/sha}","git_commits_url":"https://api.github.com/repos/stratosinc/pygatt/git/commits{/sha}","comments_url":"https://api.github.com/repos/stratosinc/pygatt/comments{/number}","issue_comment_url":"https://api.github.com/repos/stratosinc/pygatt/issues/comments{/number}","contents_url":"https://api.github.com/repos/stratosinc/pygatt/contents/{+path}","compare_url":"https://api.github.com/repos/stratosinc/pygatt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stratosinc/pygatt/merges","archive_url":"https://api.github.com/repos/stratosinc/pygatt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stratosinc/pygatt/downloads","issues_url":"https://api.github.com/repos/stratosinc/pygatt/issues{/number}","pulls_url":"https://api.github.com/repos/stratosinc/pygatt/pulls{/number}","milestones_url":"https://api.github.com/repos/stratosinc/pygatt/milestones{/number}","notifications_url":"https://api.github.com/repos/stratosinc/pygatt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stratosinc/pygatt/labels{/name}","releases_url":"https://api.github.com/repos/stratosinc/pygatt/releases{/id}","created_at":"2014-05-02T18:47:01Z","updated_at":"2015-07-28T19:44:42Z","pushed_at":"2015-08-26T21:43:48Z","git_url":"git://github.com/stratosinc/pygatt.git","ssh_url":"git@github.com:stratosinc/pygatt.git","clone_url":"https://github.com/stratosinc/pygatt.git","svn_url":"https://github.com/stratosinc/pygatt","homepage":"","size":13854,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":6,"default_branch":"next"}},"base":{"label":"stratosinc:next","ref":"next","sha":"9d40ef40774735ed73741bdebcee257765c6ca83","user":{"login":"stratosinc","id":5115139,"avatar_url":"https://avatars.githubusercontent.com/u/5115139?v=3","gravatar_id":"","url":"https://api.github.com/users/stratosinc","html_url":"https://github.com/stratosinc","followers_url":"https://api.github.com/users/stratosinc/followers","following_url":"https://api.github.com/users/stratosinc/following{/other_user}","gists_url":"https://api.github.com/users/stratosinc/gists{/gist_id}","starred_url":"https://api.github.com/users/stratosinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stratosinc/subscriptions","organizations_url":"https://api.github.com/users/stratosinc/orgs","repos_url":"https://api.github.com/users/stratosinc/repos","events_url":"https://api.github.com/users/stratosinc/events{/privacy}","received_events_url":"https://api.github.com/users/stratosinc/received_events","type":"Organization","site_admin":false},"repo":{"id":19384977,"name":"pygatt","full_name":"stratosinc/pygatt","owner":{"login":"stratosinc","id":5115139,"avatar_url":"https://avatars.githubusercontent.com/u/5115139?v=3","gravatar_id":"","url":"https://api.github.com/users/stratosinc","html_url":"https://github.com/stratosinc","followers_url":"https://api.github.com/users/stratosinc/followers","following_url":"https://api.github.com/users/stratosinc/following{/other_user}","gists_url":"https://api.github.com/users/stratosinc/gists{/gist_id}","starred_url":"https://api.github.com/users/stratosinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stratosinc/subscriptions","organizations_url":"https://api.github.com/users/stratosinc/orgs","repos_url":"https://api.github.com/users/stratosinc/repos","events_url":"https://api.github.com/users/stratosinc/events{/privacy}","received_events_url":"https://api.github.com/users/stratosinc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stratosinc/pygatt","description":"Python wrapper for gatttool from BlueZ to access Bluetooth LE Devices","fork":true,"url":"https://api.github.com/repos/stratosinc/pygatt","forks_url":"https://api.github.com/repos/stratosinc/pygatt/forks","keys_url":"https://api.github.com/repos/stratosinc/pygatt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stratosinc/pygatt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stratosinc/pygatt/teams","hooks_url":"https://api.github.com/repos/stratosinc/pygatt/hooks","issue_events_url":"https://api.github.com/repos/stratosinc/pygatt/issues/events{/number}","events_url":"https://api.github.com/repos/stratosinc/pygatt/events","assignees_url":"https://api.github.com/repos/stratosinc/pygatt/assignees{/user}","branches_url":"https://api.github.com/repos/stratosinc/pygatt/branches{/branch}","tags_url":"https://api.github.com/repos/stratosinc/pygatt/tags","blobs_url":"https://api.github.com/repos/stratosinc/pygatt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stratosinc/pygatt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stratosinc/pygatt/git/refs{/sha}","trees_url":"https://api.github.com/repos/stratosinc/pygatt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stratosinc/pygatt/statuses/{sha}","languages_url":"https://api.github.com/repos/stratosinc/pygatt/languages","stargazers_url":"https://api.github.com/repos/stratosinc/pygatt/stargazers","contributors_url":"https://api.github.com/repos/stratosinc/pygatt/contributors","subscribers_url":"https://api.github.com/repos/stratosinc/pygatt/subscribers","subscription_url":"https://api.github.com/repos/stratosinc/pygatt/subscription","commits_url":"https://api.github.com/repos/stratosinc/pygatt/commits{/sha}","git_commits_url":"https://api.github.com/repos/stratosinc/pygatt/git/commits{/sha}","comments_url":"https://api.github.com/repos/stratosinc/pygatt/comments{/number}","issue_comment_url":"https://api.github.com/repos/stratosinc/pygatt/issues/comments{/number}","contents_url":"https://api.github.com/repos/stratosinc/pygatt/contents/{+path}","compare_url":"https://api.github.com/repos/stratosinc/pygatt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stratosinc/pygatt/merges","archive_url":"https://api.github.com/repos/stratosinc/pygatt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stratosinc/pygatt/downloads","issues_url":"https://api.github.com/repos/stratosinc/pygatt/issues{/number}","pulls_url":"https://api.github.com/repos/stratosinc/pygatt/pulls{/number}","milestones_url":"https://api.github.com/repos/stratosinc/pygatt/milestones{/number}","notifications_url":"https://api.github.com/repos/stratosinc/pygatt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stratosinc/pygatt/labels{/name}","releases_url":"https://api.github.com/repos/stratosinc/pygatt/releases{/id}","created_at":"2014-05-02T18:47:01Z","updated_at":"2015-07-28T19:44:42Z","pushed_at":"2015-08-26T21:43:48Z","git_url":"git://github.com/stratosinc/pygatt.git","ssh_url":"git@github.com:stratosinc/pygatt.git","clone_url":"https://github.com/stratosinc/pygatt.git","svn_url":"https://github.com/stratosinc/pygatt","homepage":"","size":13854,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":6,"default_branch":"next"}},"_links":{"self":{"href":"https://api.github.com/repos/stratosinc/pygatt/pulls/21"},"html":{"href":"https://github.com/stratosinc/pygatt/pull/21"},"issue":{"href":"https://api.github.com/repos/stratosinc/pygatt/issues/21"},"comments":{"href":"https://api.github.com/repos/stratosinc/pygatt/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/stratosinc/pygatt/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/stratosinc/pygatt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stratosinc/pygatt/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/stratosinc/pygatt/statuses/13a0e8b287759457a3a903e1ff1ddd4d7c351be5"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"peplin","id":184212,"avatar_url":"https://avatars.githubusercontent.com/u/184212?v=3","gravatar_id":"","url":"https://api.github.com/users/peplin","html_url":"https://github.com/peplin","followers_url":"https://api.github.com/users/peplin/followers","following_url":"https://api.github.com/users/peplin/following{/other_user}","gists_url":"https://api.github.com/users/peplin/gists{/gist_id}","starred_url":"https://api.github.com/users/peplin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peplin/subscriptions","organizations_url":"https://api.github.com/users/peplin/orgs","repos_url":"https://api.github.com/users/peplin/repos","events_url":"https://api.github.com/users/peplin/events{/privacy}","received_events_url":"https://api.github.com/users/peplin/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":28,"additions":1606,"deletions":2489,"changed_files":13}}