GitHub PullRequestReviewCommentEvent at 2014-10-23 19:15:17
Repository: docker
Actor: crosbymichael
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/19300629","id":19300629,"diff_hunk":"@@ -75,27 +78,40 @@ type Logger struct {\n \n func (l Logger) Debugf(format string, a ...interface{}) (int, error) {\n \tif os.Getenv(\"DEBUG\") != \"\" {\n-\t\treturn l.logf(l.Err, debugPriority, format, a...)\n+\t\treturn l.log(debugPriority, fmt.Sprintf(format, a))\n \t}\n \treturn 0, nil\n }\n \n func (l Logger) Infof(format string, a ...interface{}) (int, error) {\n-\treturn l.logf(l.Out, infoPriority, format, a...)\n+\treturn l.log(infoPriority, fmt.Sprintf(format, a...))\n }\n \n func (l Logger) Errorf(format string, a ...interface{}) (int, error) {\n-\treturn l.logf(l.Err, errorPriority, format, a...)\n+\treturn l.log(errorPriority, fmt.Sprintf(format, a...))\n }\n \n func (l Logger) Fatalf(format string, a ...interface{}) {\n-\tl.logf(l.Err, fatalPriority, format, a...)\n-\tos.Exit(1)\n+\tl.log(fatalPriority, fmt.Sprintf(format, a...))\n }\n \n-func (l Logger) logf(stream io.Writer, level priority, format string, a ...interface{}) (int, error) {\n-\tvar prefix string\n+func (l Logger) getStream(level priority) io.Writer {\n+\tswitch level {\n+\tcase infoPriority:\n+\t\treturn l.Out\n+\tdefault:\n+\t\treturn l.Err\n+\t}\n+}\n \n+func (l Logger) log(level priority, s string) (int, error) {\n+\tts := time.Now().Format(timeutils.RFC3339NanoFixed)\n+\tstream := l.getStream(level)\n+\tdefer func() {\n+\t\tif level == fatalPriority {\n+\t\t\tos.Exit(1)","path":"pkg/log/log.go","position":80,"original_position":80,"commit_id":"bc25e69cbd96b2bb894e22c3a6a0ae27117c322d","original_commit_id":"bc25e69cbd96b2bb894e22c3a6a0ae27117c322d","user":{"login":"crosbymichael","id":749551,"avatar_url":"https://avatars.githubusercontent.com/u/749551?v=2","gravatar_id":"","url":"https://api.github.com/users/crosbymichael","html_url":"https://github.com/crosbymichael","followers_url":"https://api.github.com/users/crosbymichael/followers","following_url":"https://api.github.com/users/crosbymichael/following{/other_user}","gists_url":"https://api.github.com/users/crosbymichael/gists{/gist_id}","starred_url":"https://api.github.com/users/crosbymichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crosbymichael/subscriptions","organizations_url":"https://api.github.com/users/crosbymichael/orgs","repos_url":"https://api.github.com/users/crosbymichael/repos","events_url":"https://api.github.com/users/crosbymichael/events{/privacy}","received_events_url":"https://api.github.com/users/crosbymichael/received_events","type":"User","site_admin":false},"body":"This is new, will it have some unintended side effects?","created_at":"2014-10-23T19:15:17Z","updated_at":"2014-10-23T19:15:17Z","html_url":"https://github.com/docker/docker/pull/8730#discussion_r19300629","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/8730","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/19300629"},"html":{"href":"https://github.com/docker/docker/pull/8730#discussion_r19300629"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/8730"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/8730","id":23237130,"html_url":"https://github.com/docker/docker/pull/8730","diff_url":"https://github.com/docker/docker/pull/8730.diff","patch_url":"https://github.com/docker/docker/pull/8730.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/8730","number":8730,"state":"open","locked":false,"title":"Refactoring of pkg/log and fix for calldepth","user":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars.githubusercontent.com/u/101445?v=2","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"body":"All logging was from pkg/log/log.go file before.\r\n\r\nBut I think that all this log stuff becoming ridiculous. We're trying to write one billion first logging framework for go and we actually have no enough time for this.\r\nI vote for using just log from std or vendoring some popular logging framework. ","created_at":"2014-10-23T15:39:34Z","updated_at":"2014-10-23T19:15:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09029439656e04f341b1609a0fbaf1c3b493b4a8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/8730/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/8730/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments/{number}","comments_url":"https://api.github.com/repos/docker/docker/issues/8730/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/bc25e69cbd96b2bb894e22c3a6a0ae27117c322d","head":{"label":"LK4D4:fix_log_depth","ref":"fix_log_depth","sha":"bc25e69cbd96b2bb894e22c3a6a0ae27117c322d","user":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars.githubusercontent.com/u/101445?v=2","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"repo":{"id":17854886,"name":"docker","full_name":"LK4D4/docker","owner":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars.githubusercontent.com/u/101445?v=2","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LK4D4/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/LK4D4/docker","forks_url":"https://api.github.com/repos/LK4D4/docker/forks","keys_url":"https://api.github.com/repos/LK4D4/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LK4D4/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LK4D4/docker/teams","hooks_url":"https://api.github.com/repos/LK4D4/docker/hooks","issue_events_url":"https://api.github.com/repos/LK4D4/docker/issues/events{/number}","events_url":"https://api.github.com/repos/LK4D4/docker/events","assignees_url":"https://api.github.com/repos/LK4D4/docker/assignees{/user}","branches_url":"https://api.github.com/repos/LK4D4/docker/branches{/branch}","tags_url":"https://api.github.com/repos/LK4D4/docker/tags","blobs_url":"https://api.github.com/repos/LK4D4/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LK4D4/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LK4D4/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/LK4D4/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LK4D4/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/LK4D4/docker/languages","stargazers_url":"https://api.github.com/repos/LK4D4/docker/stargazers","contributors_url":"https://api.github.com/repos/LK4D4/docker/contributors","subscribers_url":"https://api.github.com/repos/LK4D4/docker/subscribers","subscription_url":"https://api.github.com/repos/LK4D4/docker/subscription","commits_url":"https://api.github.com/repos/LK4D4/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/LK4D4/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/LK4D4/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/LK4D4/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/LK4D4/docker/contents/{+path}","compare_url":"https://api.github.com/repos/LK4D4/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LK4D4/docker/merges","archive_url":"https://api.github.com/repos/LK4D4/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LK4D4/docker/downloads","issues_url":"https://api.github.com/repos/LK4D4/docker/issues{/number}","pulls_url":"https://api.github.com/repos/LK4D4/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/LK4D4/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/LK4D4/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LK4D4/docker/labels{/name}","releases_url":"https://api.github.com/repos/LK4D4/docker/releases{/id}","created_at":"2014-03-18T05:30:16Z","updated_at":"2014-07-06T06:13:15Z","pushed_at":"2014-10-23T16:44:42Z","git_url":"git://github.com/LK4D4/docker.git","ssh_url":"git@github.com:LK4D4/docker.git","clone_url":"https://github.com/LK4D4/docker.git","svn_url":"https://github.com/LK4D4/docker","homepage":"http://www.docker.io","size":38171,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"1aa67071cb3e6bc8a08f662d913cdb1b1eda1645","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=2","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=2","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2014-10-23T18:17:17Z","pushed_at":"2014-10-23T19:10:21Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":153080,"stargazers_count":15980,"watchers_count":15980,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3108,"mirror_url":null,"open_issues_count":814,"forks":3108,"open_issues":814,"watchers":15980,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/8730"},"html":{"href":"https://github.com/docker/docker/pull/8730"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/8730"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/8730/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/8730/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/8730/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/bc25e69cbd96b2bb894e22c3a6a0ae27117c322d"}}}}