{"action":"created","comment":{"url":"https://api.github.com/repos/uber-go/zap/pulls/comments/86892126","pull_request_review_id":7527406,"id":86892126,"diff_hunk":"@@ -0,0 +1,139 @@\n+// Copyright (c) 2016 Uber Technologies, Inc.\n+//\n+// Permission is hereby granted, free of charge, to any person obtaining a copy\n+// of this software and associated documentation files (the \"Software\"), to deal\n+// in the Software without restriction, including without limitation the rights\n+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+// copies of the Software, and to permit persons to whom the Software is\n+// furnished to do so, subject to the following conditions:\n+//\n+// The above copyright notice and this permission notice shall be included in\n+// all copies or substantial portions of the Software.\n+//\n+// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+// THE SOFTWARE.\n+\n+package zap\n+\n+import \"github.com/uber-go/atomic\"\n+\n+// TeeLogger creates a Logger that duplicates its log calls to two or\n+// more loggers. It is similar to io.MultiWriter.\n+//\n+// The returned logger will initially have the minimum level of all passed\n+// loggers. Changing the returned logger's level will change the level on all\n+// wrapped loggers.\n+//\n+// With the exception of DFatal, the returned tee logger calls .Log(level, ...)","path":"tee_logger.go","position":32,"original_position":32,"commit_id":"619eefb27be16d2ebc2ed8fe7beeaef6f7a5b4af","original_commit_id":"619eefb27be16d2ebc2ed8fe7beeaef6f7a5b4af","user":{"login":"jcorbin","id":49715,"avatar_url":"https://avatars.githubusercontent.com/u/49715?v=3","gravatar_id":"","url":"https://api.github.com/users/jcorbin","html_url":"https://github.com/jcorbin","followers_url":"https://api.github.com/users/jcorbin/followers","following_url":"https://api.github.com/users/jcorbin/following{/other_user}","gists_url":"https://api.github.com/users/jcorbin/gists{/gist_id}","starred_url":"https://api.github.com/users/jcorbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcorbin/subscriptions","organizations_url":"https://api.github.com/users/jcorbin/orgs","repos_url":"https://api.github.com/users/jcorbin/repos","events_url":"https://api.github.com/users/jcorbin/events{/privacy}","received_events_url":"https://api.github.com/users/jcorbin/received_events","type":"User","site_admin":false},"body":"This exception is unfortunate in my view, pointing to \"DFatal should be just another log level\" in my opinion; we could have the exact same semantics, that `logger.DFatal` gets to make a choice, but `logger.Log` either passes the level through, or maps it to \"error\" always.","created_at":"2016-11-07T23:16:59Z","updated_at":"2016-11-07T23:17:06Z","html_url":"https://github.com/uber-go/zap/pull/161#discussion_r86892126","pull_request_url":"https://api.github.com/repos/uber-go/zap/pulls/161","_links":{"self":{"href":"https://api.github.com/repos/uber-go/zap/pulls/comments/86892126"},"html":{"href":"https://github.com/uber-go/zap/pull/161#discussion_r86892126"},"pull_request":{"href":"https://api.github.com/repos/uber-go/zap/pulls/161"}}},"pull_request":{"url":"https://api.github.com/repos/uber-go/zap/pulls/161","id":91285321,"html_url":"https://github.com/uber-go/zap/pull/161","diff_url":"https://github.com/uber-go/zap/pull/161.diff","patch_url":"https://github.com/uber-go/zap/pull/161.patch","issue_url":"https://api.github.com/repos/uber-go/zap/issues/161","number":161,"state":"open","locked":false,"title":"WIP: tee logger","user":{"login":"jcorbin","id":49715,"avatar_url":"https://avatars.githubusercontent.com/u/49715?v=3","gravatar_id":"","url":"https://api.github.com/users/jcorbin","html_url":"https://github.com/jcorbin","followers_url":"https://api.github.com/users/jcorbin/followers","following_url":"https://api.github.com/users/jcorbin/following{/other_user}","gists_url":"https://api.github.com/users/jcorbin/gists{/gist_id}","starred_url":"https://api.github.com/users/jcorbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcorbin/subscriptions","organizations_url":"https://api.github.com/users/jcorbin/orgs","repos_url":"https://api.github.com/users/jcorbin/repos","events_url":"https://api.github.com/users/jcorbin/events{/privacy}","received_events_url":"https://api.github.com/users/jcorbin/received_events","type":"User","site_admin":false},"body":"Towards #159 \r\n- [x] made spy logger honor level, so that I can use it to verify one useful way of using tee logger\r\n- [ ] finish enough of the concerns laid out in #166 to unlock tee logger\r\n- [ ] write a basic tee logger\r\n  - some unfortunate points, like the panic and fail note\r\n  - may want more test cases, pending reviewer request\r\n  - maybe we want to do a more involved `Check` implementation, that actually caches check message values from each downstream, only returning `nil` if all downstreams did\r\n","created_at":"2016-10-27T21:36:05Z","updated_at":"2016-11-07T23:17:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5bdeb1ec0db1153fdaac7236e723d7a528d4646","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/uber-go/zap/pulls/161/commits","review_comments_url":"https://api.github.com/repos/uber-go/zap/pulls/161/comments","review_comment_url":"https://api.github.com/repos/uber-go/zap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber-go/zap/issues/161/comments","statuses_url":"https://api.github.com/repos/uber-go/zap/statuses/619eefb27be16d2ebc2ed8fe7beeaef6f7a5b4af","head":{"label":"uber-go:tee_logger","ref":"tee_logger","sha":"619eefb27be16d2ebc2ed8fe7beeaef6f7a5b4af","user":{"login":"uber-go","id":19262598,"avatar_url":"https://avatars.githubusercontent.com/u/19262598?v=3","gravatar_id":"","url":"https://api.github.com/users/uber-go","html_url":"https://github.com/uber-go","followers_url":"https://api.github.com/users/uber-go/followers","following_url":"https://api.github.com/users/uber-go/following{/other_user}","gists_url":"https://api.github.com/users/uber-go/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-go/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-go/subscriptions","organizations_url":"https://api.github.com/users/uber-go/orgs","repos_url":"https://api.github.com/users/uber-go/repos","events_url":"https://api.github.com/users/uber-go/events{/privacy}","received_events_url":"https://api.github.com/users/uber-go/received_events","type":"Organization","site_admin":false},"repo":{"id":52034309,"name":"zap","full_name":"uber-go/zap","owner":{"login":"uber-go","id":19262598,"avatar_url":"https://avatars.githubusercontent.com/u/19262598?v=3","gravatar_id":"","url":"https://api.github.com/users/uber-go","html_url":"https://github.com/uber-go","followers_url":"https://api.github.com/users/uber-go/followers","following_url":"https://api.github.com/users/uber-go/following{/other_user}","gists_url":"https://api.github.com/users/uber-go/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-go/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-go/subscriptions","organizations_url":"https://api.github.com/users/uber-go/orgs","repos_url":"https://api.github.com/users/uber-go/repos","events_url":"https://api.github.com/users/uber-go/events{/privacy}","received_events_url":"https://api.github.com/users/uber-go/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber-go/zap","description":"Fast, structured, leveled logging in Go","fork":false,"url":"https://api.github.com/repos/uber-go/zap","forks_url":"https://api.github.com/repos/uber-go/zap/forks","keys_url":"https://api.github.com/repos/uber-go/zap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber-go/zap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber-go/zap/teams","hooks_url":"https://api.github.com/repos/uber-go/zap/hooks","issue_events_url":"https://api.github.com/repos/uber-go/zap/issues/events{/number}","events_url":"https://api.github.com/repos/uber-go/zap/events","assignees_url":"https://api.github.com/repos/uber-go/zap/assignees{/user}","branches_url":"https://api.github.com/repos/uber-go/zap/branches{/branch}","tags_url":"https://api.github.com/repos/uber-go/zap/tags","blobs_url":"https://api.github.com/repos/uber-go/zap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber-go/zap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber-go/zap/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber-go/zap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber-go/zap/statuses/{sha}","languages_url":"https://api.github.com/repos/uber-go/zap/languages","stargazers_url":"https://api.github.com/repos/uber-go/zap/stargazers","contributors_url":"https://api.github.com/repos/uber-go/zap/contributors","subscribers_url":"https://api.github.com/repos/uber-go/zap/subscribers","subscription_url":"https://api.github.com/repos/uber-go/zap/subscription","commits_url":"https://api.github.com/repos/uber-go/zap/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber-go/zap/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber-go/zap/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber-go/zap/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber-go/zap/contents/{+path}","compare_url":"https://api.github.com/repos/uber-go/zap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber-go/zap/merges","archive_url":"https://api.github.com/repos/uber-go/zap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber-go/zap/downloads","issues_url":"https://api.github.com/repos/uber-go/zap/issues{/number}","pulls_url":"https://api.github.com/repos/uber-go/zap/pulls{/number}","milestones_url":"https://api.github.com/repos/uber-go/zap/milestones{/number}","notifications_url":"https://api.github.com/repos/uber-go/zap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber-go/zap/labels{/name}","releases_url":"https://api.github.com/repos/uber-go/zap/releases{/id}","deployments_url":"https://api.github.com/repos/uber-go/zap/deployments","created_at":"2016-02-18T19:52:56Z","updated_at":"2016-11-07T11:12:21Z","pushed_at":"2016-11-07T23:12:31Z","git_url":"git://github.com/uber-go/zap.git","ssh_url":"git@github.com:uber-go/zap.git","clone_url":"https://github.com/uber-go/zap.git","svn_url":"https://github.com/uber-go/zap","homepage":"https://godoc.org/github.com/uber-go/zap","size":412,"stargazers_count":1517,"watchers_count":1517,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":72,"mirror_url":null,"open_issues_count":23,"forks":72,"open_issues":23,"watchers":1517,"default_branch":"master"}},"base":{"label":"uber-go:master","ref":"master","sha":"4c91d004f49ece51375da92fe549ed6db703e7d5","user":{"login":"uber-go","id":19262598,"avatar_url":"https://avatars.githubusercontent.com/u/19262598?v=3","gravatar_id":"","url":"https://api.github.com/users/uber-go","html_url":"https://github.com/uber-go","followers_url":"https://api.github.com/users/uber-go/followers","following_url":"https://api.github.com/users/uber-go/following{/other_user}","gists_url":"https://api.github.com/users/uber-go/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-go/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-go/subscriptions","organizations_url":"https://api.github.com/users/uber-go/orgs","repos_url":"https://api.github.com/users/uber-go/repos","events_url":"https://api.github.com/users/uber-go/events{/privacy}","received_events_url":"https://api.github.com/users/uber-go/received_events","type":"Organization","site_admin":false},"repo":{"id":52034309,"name":"zap","full_name":"uber-go/zap","owner":{"login":"uber-go","id":19262598,"avatar_url":"https://avatars.githubusercontent.com/u/19262598?v=3","gravatar_id":"","url":"https://api.github.com/users/uber-go","html_url":"https://github.com/uber-go","followers_url":"https://api.github.com/users/uber-go/followers","following_url":"https://api.github.com/users/uber-go/following{/other_user}","gists_url":"https://api.github.com/users/uber-go/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-go/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-go/subscriptions","organizations_url":"https://api.github.com/users/uber-go/orgs","repos_url":"https://api.github.com/users/uber-go/repos","events_url":"https://api.github.com/users/uber-go/events{/privacy}","received_events_url":"https://api.github.com/users/uber-go/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber-go/zap","description":"Fast, structured, leveled logging in Go","fork":false,"url":"https://api.github.com/repos/uber-go/zap","forks_url":"https://api.github.com/repos/uber-go/zap/forks","keys_url":"https://api.github.com/repos/uber-go/zap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber-go/zap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber-go/zap/teams","hooks_url":"https://api.github.com/repos/uber-go/zap/hooks","issue_events_url":"https://api.github.com/repos/uber-go/zap/issues/events{/number}","events_url":"https://api.github.com/repos/uber-go/zap/events","assignees_url":"https://api.github.com/repos/uber-go/zap/assignees{/user}","branches_url":"https://api.github.com/repos/uber-go/zap/branches{/branch}","tags_url":"https://api.github.com/repos/uber-go/zap/tags","blobs_url":"https://api.github.com/repos/uber-go/zap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber-go/zap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber-go/zap/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber-go/zap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber-go/zap/statuses/{sha}","languages_url":"https://api.github.com/repos/uber-go/zap/languages","stargazers_url":"https://api.github.com/repos/uber-go/zap/stargazers","contributors_url":"https://api.github.com/repos/uber-go/zap/contributors","subscribers_url":"https://api.github.com/repos/uber-go/zap/subscribers","subscription_url":"https://api.github.com/repos/uber-go/zap/subscription","commits_url":"https://api.github.com/repos/uber-go/zap/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber-go/zap/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber-go/zap/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber-go/zap/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber-go/zap/contents/{+path}","compare_url":"https://api.github.com/repos/uber-go/zap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber-go/zap/merges","archive_url":"https://api.github.com/repos/uber-go/zap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber-go/zap/downloads","issues_url":"https://api.github.com/repos/uber-go/zap/issues{/number}","pulls_url":"https://api.github.com/repos/uber-go/zap/pulls{/number}","milestones_url":"https://api.github.com/repos/uber-go/zap/milestones{/number}","notifications_url":"https://api.github.com/repos/uber-go/zap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber-go/zap/labels{/name}","releases_url":"https://api.github.com/repos/uber-go/zap/releases{/id}","deployments_url":"https://api.github.com/repos/uber-go/zap/deployments","created_at":"2016-02-18T19:52:56Z","updated_at":"2016-11-07T11:12:21Z","pushed_at":"2016-11-07T23:12:31Z","git_url":"git://github.com/uber-go/zap.git","ssh_url":"git@github.com:uber-go/zap.git","clone_url":"https://github.com/uber-go/zap.git","svn_url":"https://github.com/uber-go/zap","homepage":"https://godoc.org/github.com/uber-go/zap","size":412,"stargazers_count":1517,"watchers_count":1517,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":72,"mirror_url":null,"open_issues_count":23,"forks":72,"open_issues":23,"watchers":1517,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber-go/zap/pulls/161"},"html":{"href":"https://github.com/uber-go/zap/pull/161"},"issue":{"href":"https://api.github.com/repos/uber-go/zap/issues/161"},"comments":{"href":"https://api.github.com/repos/uber-go/zap/issues/161/comments"},"review_comments":{"href":"https://api.github.com/repos/uber-go/zap/pulls/161/comments"},"review_comment":{"href":"https://api.github.com/repos/uber-go/zap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber-go/zap/pulls/161/commits"},"statuses":{"href":"https://api.github.com/repos/uber-go/zap/statuses/619eefb27be16d2ebc2ed8fe7beeaef6f7a5b4af"}}}}
{"actor":{"display_login":"jcorbin"}}