{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang-nursery/log/pulls/comments/123025488","pull_request_review_id":45191296,"id":123025488,"diff_hunk":"@@ -1153,12 +1155,6 @@ mod panic {\n \n struct LoggerGuard(&'static Log);\n \n-impl Drop for LoggerGuard {","path":"src/lib.rs","position":65,"original_position":65,"commit_id":"c3ded0a45ff47d96afdd2f2ee2161f5a1be54cce","original_commit_id":"c3ded0a45ff47d96afdd2f2ee2161f5a1be54cce","user":{"login":"sfackler","id":1455697,"avatar_url":"https://avatars3.githubusercontent.com/u/1455697?v=3","gravatar_id":"","url":"https://api.github.com/users/sfackler","html_url":"https://github.com/sfackler","followers_url":"https://api.github.com/users/sfackler/followers","following_url":"https://api.github.com/users/sfackler/following{/other_user}","gists_url":"https://api.github.com/users/sfackler/gists{/gist_id}","starred_url":"https://api.github.com/users/sfackler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfackler/subscriptions","organizations_url":"https://api.github.com/users/sfackler/orgs","repos_url":"https://api.github.com/users/sfackler/repos","events_url":"https://api.github.com/users/sfackler/events{/privacy}","received_events_url":"https://api.github.com/users/sfackler/received_events","type":"User","site_admin":false},"body":" The refcounting logic ensures there aren't any log calls actively using the logger while we tear it down, which would be a use-after-free. We can't depend on flush doing this synchronization for us - the default implementation does nothing at all for example!\r\n\r\nWe're removing shutdown because it's not sufficiently useful compared to its cost in all of this refcounting. The addition of `flush` is only semi-related - it's just a way to allow people to make sure that any buffers or whatever are flushed before their application exits so they don't drop messages on the floor.","created_at":"2017-06-20T16:22:13Z","updated_at":"2017-06-20T16:22:13Z","html_url":"https://github.com/rust-lang-nursery/log/pull/196#discussion_r123025488","pull_request_url":"https://api.github.com/repos/rust-lang-nursery/log/pulls/196","_links":{"self":{"href":"https://api.github.com/repos/rust-lang-nursery/log/pulls/comments/123025488"},"html":{"href":"https://github.com/rust-lang-nursery/log/pull/196#discussion_r123025488"},"pull_request":{"href":"https://api.github.com/repos/rust-lang-nursery/log/pulls/196"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang-nursery/log/pulls/196","id":124046845,"html_url":"https://github.com/rust-lang-nursery/log/pull/196","diff_url":"https://github.com/rust-lang-nursery/log/pull/196.diff","patch_url":"https://github.com/rust-lang-nursery/log/pull/196.patch","issue_url":"https://api.github.com/repos/rust-lang-nursery/log/issues/196","number":196,"state":"open","locked":false,"title":"add `flush` to `Log` trait","user":{"login":"danielscottt","id":1194436,"avatar_url":"https://avatars2.githubusercontent.com/u/1194436?v=3","gravatar_id":"","url":"https://api.github.com/users/danielscottt","html_url":"https://github.com/danielscottt","followers_url":"https://api.github.com/users/danielscottt/followers","following_url":"https://api.github.com/users/danielscottt/following{/other_user}","gists_url":"https://api.github.com/users/danielscottt/gists{/gist_id}","starred_url":"https://api.github.com/users/danielscottt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielscottt/subscriptions","organizations_url":"https://api.github.com/users/danielscottt/orgs","repos_url":"https://api.github.com/users/danielscottt/repos","events_url":"https://api.github.com/users/danielscottt/events{/privacy}","received_events_url":"https://api.github.com/users/danielscottt/received_events","type":"User","site_admin":false},"body":"This commit adds flush as the synchronization point for actively logging\r\nthreads.  This, therefore, removes the need for the `REFCOUNT` static\r\npreviously used for this purpose, putting the onus for the\r\nsynchronization of `log` calls onto to implementors of `Log`.\r\n\r\n--\r\n\r\nFixes #117 \r\n\r\n--\r\n\r\nFWIW - I have another commit that reimplements the reference-counted synchronization in `env_logger`, too, if that is something that you all would like me to add to this PR.","created_at":"2017-06-05T19:55:04Z","updated_at":"2017-06-20T16:22:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dcdba8180615a6e899d76346b8a957919d971184","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang-nursery/log/pulls/196/commits","review_comments_url":"https://api.github.com/repos/rust-lang-nursery/log/pulls/196/comments","review_comment_url":"https://api.github.com/repos/rust-lang-nursery/log/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang-nursery/log/issues/196/comments","statuses_url":"https://api.github.com/repos/rust-lang-nursery/log/statuses/c3ded0a45ff47d96afdd2f2ee2161f5a1be54cce","head":{"label":"danielscottt:flush","ref":"flush","sha":"c3ded0a45ff47d96afdd2f2ee2161f5a1be54cce","user":{"login":"danielscottt","id":1194436,"avatar_url":"https://avatars2.githubusercontent.com/u/1194436?v=3","gravatar_id":"","url":"https://api.github.com/users/danielscottt","html_url":"https://github.com/danielscottt","followers_url":"https://api.github.com/users/danielscottt/followers","following_url":"https://api.github.com/users/danielscottt/following{/other_user}","gists_url":"https://api.github.com/users/danielscottt/gists{/gist_id}","starred_url":"https://api.github.com/users/danielscottt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielscottt/subscriptions","organizations_url":"https://api.github.com/users/danielscottt/orgs","repos_url":"https://api.github.com/users/danielscottt/repos","events_url":"https://api.github.com/users/danielscottt/events{/privacy}","received_events_url":"https://api.github.com/users/danielscottt/received_events","type":"User","site_admin":false},"repo":{"id":93202522,"name":"log","full_name":"danielscottt/log","owner":{"login":"danielscottt","id":1194436,"avatar_url":"https://avatars2.githubusercontent.com/u/1194436?v=3","gravatar_id":"","url":"https://api.github.com/users/danielscottt","html_url":"https://github.com/danielscottt","followers_url":"https://api.github.com/users/danielscottt/followers","following_url":"https://api.github.com/users/danielscottt/following{/other_user}","gists_url":"https://api.github.com/users/danielscottt/gists{/gist_id}","starred_url":"https://api.github.com/users/danielscottt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielscottt/subscriptions","organizations_url":"https://api.github.com/users/danielscottt/orgs","repos_url":"https://api.github.com/users/danielscottt/repos","events_url":"https://api.github.com/users/danielscottt/events{/privacy}","received_events_url":"https://api.github.com/users/danielscottt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielscottt/log","description":"Logging implementation for Rust","fork":true,"url":"https://api.github.com/repos/danielscottt/log","forks_url":"https://api.github.com/repos/danielscottt/log/forks","keys_url":"https://api.github.com/repos/danielscottt/log/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielscottt/log/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielscottt/log/teams","hooks_url":"https://api.github.com/repos/danielscottt/log/hooks","issue_events_url":"https://api.github.com/repos/danielscottt/log/issues/events{/number}","events_url":"https://api.github.com/repos/danielscottt/log/events","assignees_url":"https://api.github.com/repos/danielscottt/log/assignees{/user}","branches_url":"https://api.github.com/repos/danielscottt/log/branches{/branch}","tags_url":"https://api.github.com/repos/danielscottt/log/tags","blobs_url":"https://api.github.com/repos/danielscottt/log/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielscottt/log/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielscottt/log/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielscottt/log/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielscottt/log/statuses/{sha}","languages_url":"https://api.github.com/repos/danielscottt/log/languages","stargazers_url":"https://api.github.com/repos/danielscottt/log/stargazers","contributors_url":"https://api.github.com/repos/danielscottt/log/contributors","subscribers_url":"https://api.github.com/repos/danielscottt/log/subscribers","subscription_url":"https://api.github.com/repos/danielscottt/log/subscription","commits_url":"https://api.github.com/repos/danielscottt/log/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielscottt/log/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielscottt/log/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielscottt/log/issues/comments{/number}","contents_url":"https://api.github.com/repos/danielscottt/log/contents/{+path}","compare_url":"https://api.github.com/repos/danielscottt/log/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielscottt/log/merges","archive_url":"https://api.github.com/repos/danielscottt/log/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielscottt/log/downloads","issues_url":"https://api.github.com/repos/danielscottt/log/issues{/number}","pulls_url":"https://api.github.com/repos/danielscottt/log/pulls{/number}","milestones_url":"https://api.github.com/repos/danielscottt/log/milestones{/number}","notifications_url":"https://api.github.com/repos/danielscottt/log/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielscottt/log/labels{/name}","releases_url":"https://api.github.com/repos/danielscottt/log/releases{/id}","deployments_url":"https://api.github.com/repos/danielscottt/log/deployments","created_at":"2017-06-02T20:45:32Z","updated_at":"2017-06-02T20:45:34Z","pushed_at":"2017-06-05T20:11:36Z","git_url":"git://github.com/danielscottt/log.git","ssh_url":"git@github.com:danielscottt/log.git","clone_url":"https://github.com/danielscottt/log.git","svn_url":"https://github.com/danielscottt/log","homepage":"http://doc.rust-lang.org/log","size":835,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang-nursery:master","ref":"master","sha":"da1870ed58854bf6fd549c8a43c6871c9373d6ef","user":{"login":"rust-lang-nursery","id":14631425,"avatar_url":"https://avatars2.githubusercontent.com/u/14631425?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang-nursery","html_url":"https://github.com/rust-lang-nursery","followers_url":"https://api.github.com/users/rust-lang-nursery/followers","following_url":"https://api.github.com/users/rust-lang-nursery/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang-nursery/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang-nursery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang-nursery/subscriptions","organizations_url":"https://api.github.com/users/rust-lang-nursery/orgs","repos_url":"https://api.github.com/users/rust-lang-nursery/repos","events_url":"https://api.github.com/users/rust-lang-nursery/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang-nursery/received_events","type":"Organization","site_admin":false},"repo":{"id":27974762,"name":"log","full_name":"rust-lang-nursery/log","owner":{"login":"rust-lang-nursery","id":14631425,"avatar_url":"https://avatars2.githubusercontent.com/u/14631425?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang-nursery","html_url":"https://github.com/rust-lang-nursery","followers_url":"https://api.github.com/users/rust-lang-nursery/followers","following_url":"https://api.github.com/users/rust-lang-nursery/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang-nursery/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang-nursery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang-nursery/subscriptions","organizations_url":"https://api.github.com/users/rust-lang-nursery/orgs","repos_url":"https://api.github.com/users/rust-lang-nursery/repos","events_url":"https://api.github.com/users/rust-lang-nursery/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang-nursery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang-nursery/log","description":"Logging implementation for Rust","fork":false,"url":"https://api.github.com/repos/rust-lang-nursery/log","forks_url":"https://api.github.com/repos/rust-lang-nursery/log/forks","keys_url":"https://api.github.com/repos/rust-lang-nursery/log/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang-nursery/log/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang-nursery/log/teams","hooks_url":"https://api.github.com/repos/rust-lang-nursery/log/hooks","issue_events_url":"https://api.github.com/repos/rust-lang-nursery/log/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang-nursery/log/events","assignees_url":"https://api.github.com/repos/rust-lang-nursery/log/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang-nursery/log/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang-nursery/log/tags","blobs_url":"https://api.github.com/repos/rust-lang-nursery/log/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang-nursery/log/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang-nursery/log/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang-nursery/log/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang-nursery/log/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang-nursery/log/languages","stargazers_url":"https://api.github.com/repos/rust-lang-nursery/log/stargazers","contributors_url":"https://api.github.com/repos/rust-lang-nursery/log/contributors","subscribers_url":"https://api.github.com/repos/rust-lang-nursery/log/subscribers","subscription_url":"https://api.github.com/repos/rust-lang-nursery/log/subscription","commits_url":"https://api.github.com/repos/rust-lang-nursery/log/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang-nursery/log/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang-nursery/log/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang-nursery/log/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang-nursery/log/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang-nursery/log/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang-nursery/log/merges","archive_url":"https://api.github.com/repos/rust-lang-nursery/log/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang-nursery/log/downloads","issues_url":"https://api.github.com/repos/rust-lang-nursery/log/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang-nursery/log/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang-nursery/log/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang-nursery/log/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang-nursery/log/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang-nursery/log/releases{/id}","deployments_url":"https://api.github.com/repos/rust-lang-nursery/log/deployments","created_at":"2014-12-13T21:45:04Z","updated_at":"2017-06-18T04:03:55Z","pushed_at":"2017-06-20T04:10:32Z","git_url":"git://github.com/rust-lang-nursery/log.git","ssh_url":"git@github.com:rust-lang-nursery/log.git","clone_url":"https://github.com/rust-lang-nursery/log.git","svn_url":"https://github.com/rust-lang-nursery/log","homepage":"http://doc.rust-lang.org/log","size":837,"stargazers_count":208,"watchers_count":208,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":66,"mirror_url":null,"open_issues_count":27,"forks":66,"open_issues":27,"watchers":208,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang-nursery/log/pulls/196"},"html":{"href":"https://github.com/rust-lang-nursery/log/pull/196"},"issue":{"href":"https://api.github.com/repos/rust-lang-nursery/log/issues/196"},"comments":{"href":"https://api.github.com/repos/rust-lang-nursery/log/issues/196/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang-nursery/log/pulls/196/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang-nursery/log/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang-nursery/log/pulls/196/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang-nursery/log/statuses/c3ded0a45ff47d96afdd2f2ee2161f5a1be54cce"}}}}
{"actor":{"display_login":"sfackler"}}