{"action":"created","comment":{"url":"https://api.github.com/repos/opencontainers/runc/pulls/comments/55577266","id":55577266,"diff_hunk":"@@ -63,12 +62,12 @@ is a directory with a specification file and a root filesystem.`,\n \t\t}\n \n \t\tif os.Geteuid() != 0 {\n-\t\t\tlogrus.Fatal(\"runc should be run as root\")\n+\t\t\tfatalf(\"runc should be run as root\")","path":"start.go","position":13,"original_position":13,"commit_id":"044e2985071eca89377f8ff7c53cbb5f7859b879","original_commit_id":"044e2985071eca89377f8ff7c53cbb5f7859b879","user":{"login":"crosbymichael","id":749551,"avatar_url":"https://avatars.githubusercontent.com/u/749551?v=3","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":"not really because fatal takes an error not string","created_at":"2016-03-09T19:46:50Z","updated_at":"2016-03-09T19:46:50Z","html_url":"https://github.com/opencontainers/runc/pull/628#discussion_r55577266","pull_request_url":"https://api.github.com/repos/opencontainers/runc/pulls/628","_links":{"self":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/comments/55577266"},"html":{"href":"https://github.com/opencontainers/runc/pull/628#discussion_r55577266"},"pull_request":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/628"}}},"pull_request":{"url":"https://api.github.com/repos/opencontainers/runc/pulls/628","id":62279334,"html_url":"https://github.com/opencontainers/runc/pull/628","diff_url":"https://github.com/opencontainers/runc/pull/628.diff","patch_url":"https://github.com/opencontainers/runc/pull/628.patch","issue_url":"https://api.github.com/repos/opencontainers/runc/issues/628","number":628,"state":"open","locked":false,"title":"Improve error handling in runc","user":{"login":"crosbymichael","id":749551,"avatar_url":"https://avatars.githubusercontent.com/u/749551?v=3","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":"The error handling on the runc cli is currenly pretty messy because\r\nmessages to the user are split between regular stderr format and logrus\r\nmessage format.  This changes all the error reporting to the cli to only\r\noutput on stderr and exit(1) for consumers of the api.\r\n\r\nBy default logrus logs to /dev/null so that it is not seen by the user.\r\nIf the user wants extra and/or structured loggging/errors from runc they\r\ncan use the `--log` flag to provide a path to the file where they want\r\nthis information.  This allows a consistent behavior on the cli but\r\nextra power and information when debugging with logs.\r\n\r\nThis also includes a change to enable the same logging information\r\ninside the container's init by adding an init cli command that can share\r\nthe existing flags for all other runc commands.\r\n\r\nSigned-off-by: Michael Crosby <crosbymichael@gmail.com>","created_at":"2016-03-09T19:08:54Z","updated_at":"2016-03-09T19:46:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"328dfb0dc0f5d2a593405a0628e3e1f5f667b3a1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opencontainers/runc/pulls/628/commits","review_comments_url":"https://api.github.com/repos/opencontainers/runc/pulls/628/comments","review_comment_url":"https://api.github.com/repos/opencontainers/runc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencontainers/runc/issues/628/comments","statuses_url":"https://api.github.com/repos/opencontainers/runc/statuses/044e2985071eca89377f8ff7c53cbb5f7859b879","head":{"label":"crosbymichael:log-errors","ref":"log-errors","sha":"044e2985071eca89377f8ff7c53cbb5f7859b879","user":{"login":"crosbymichael","id":749551,"avatar_url":"https://avatars.githubusercontent.com/u/749551?v=3","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},"repo":{"id":38062262,"name":"runc","full_name":"crosbymichael/runc","owner":{"login":"crosbymichael","id":749551,"avatar_url":"https://avatars.githubusercontent.com/u/749551?v=3","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},"private":false,"html_url":"https://github.com/crosbymichael/runc","description":"runc container cli tools","fork":true,"url":"https://api.github.com/repos/crosbymichael/runc","forks_url":"https://api.github.com/repos/crosbymichael/runc/forks","keys_url":"https://api.github.com/repos/crosbymichael/runc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crosbymichael/runc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crosbymichael/runc/teams","hooks_url":"https://api.github.com/repos/crosbymichael/runc/hooks","issue_events_url":"https://api.github.com/repos/crosbymichael/runc/issues/events{/number}","events_url":"https://api.github.com/repos/crosbymichael/runc/events","assignees_url":"https://api.github.com/repos/crosbymichael/runc/assignees{/user}","branches_url":"https://api.github.com/repos/crosbymichael/runc/branches{/branch}","tags_url":"https://api.github.com/repos/crosbymichael/runc/tags","blobs_url":"https://api.github.com/repos/crosbymichael/runc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crosbymichael/runc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crosbymichael/runc/git/refs{/sha}","trees_url":"https://api.github.com/repos/crosbymichael/runc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crosbymichael/runc/statuses/{sha}","languages_url":"https://api.github.com/repos/crosbymichael/runc/languages","stargazers_url":"https://api.github.com/repos/crosbymichael/runc/stargazers","contributors_url":"https://api.github.com/repos/crosbymichael/runc/contributors","subscribers_url":"https://api.github.com/repos/crosbymichael/runc/subscribers","subscription_url":"https://api.github.com/repos/crosbymichael/runc/subscription","commits_url":"https://api.github.com/repos/crosbymichael/runc/commits{/sha}","git_commits_url":"https://api.github.com/repos/crosbymichael/runc/git/commits{/sha}","comments_url":"https://api.github.com/repos/crosbymichael/runc/comments{/number}","issue_comment_url":"https://api.github.com/repos/crosbymichael/runc/issues/comments{/number}","contents_url":"https://api.github.com/repos/crosbymichael/runc/contents/{+path}","compare_url":"https://api.github.com/repos/crosbymichael/runc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crosbymichael/runc/merges","archive_url":"https://api.github.com/repos/crosbymichael/runc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crosbymichael/runc/downloads","issues_url":"https://api.github.com/repos/crosbymichael/runc/issues{/number}","pulls_url":"https://api.github.com/repos/crosbymichael/runc/pulls{/number}","milestones_url":"https://api.github.com/repos/crosbymichael/runc/milestones{/number}","notifications_url":"https://api.github.com/repos/crosbymichael/runc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crosbymichael/runc/labels{/name}","releases_url":"https://api.github.com/repos/crosbymichael/runc/releases{/id}","deployments_url":"https://api.github.com/repos/crosbymichael/runc/deployments","created_at":"2015-06-25T16:59:57Z","updated_at":"2016-02-20T12:32:13Z","pushed_at":"2016-03-09T19:08:39Z","git_url":"git://github.com/crosbymichael/runc.git","ssh_url":"git@github.com:crosbymichael/runc.git","clone_url":"https://github.com/crosbymichael/runc.git","svn_url":"https://github.com/crosbymichael/runc","homepage":"","size":2677,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"opencontainers:master","ref":"master","sha":"4155b68a243558ad83b2e7bd9dcbaea50a9ac345","user":{"login":"opencontainers","id":12563465,"avatar_url":"https://avatars.githubusercontent.com/u/12563465?v=3","gravatar_id":"","url":"https://api.github.com/users/opencontainers","html_url":"https://github.com/opencontainers","followers_url":"https://api.github.com/users/opencontainers/followers","following_url":"https://api.github.com/users/opencontainers/following{/other_user}","gists_url":"https://api.github.com/users/opencontainers/gists{/gist_id}","starred_url":"https://api.github.com/users/opencontainers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencontainers/subscriptions","organizations_url":"https://api.github.com/users/opencontainers/orgs","repos_url":"https://api.github.com/users/opencontainers/repos","events_url":"https://api.github.com/users/opencontainers/events{/privacy}","received_events_url":"https://api.github.com/users/opencontainers/received_events","type":"Organization","site_admin":false},"repo":{"id":36960321,"name":"runc","full_name":"opencontainers/runc","owner":{"login":"opencontainers","id":12563465,"avatar_url":"https://avatars.githubusercontent.com/u/12563465?v=3","gravatar_id":"","url":"https://api.github.com/users/opencontainers","html_url":"https://github.com/opencontainers","followers_url":"https://api.github.com/users/opencontainers/followers","following_url":"https://api.github.com/users/opencontainers/following{/other_user}","gists_url":"https://api.github.com/users/opencontainers/gists{/gist_id}","starred_url":"https://api.github.com/users/opencontainers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencontainers/subscriptions","organizations_url":"https://api.github.com/users/opencontainers/orgs","repos_url":"https://api.github.com/users/opencontainers/repos","events_url":"https://api.github.com/users/opencontainers/events{/privacy}","received_events_url":"https://api.github.com/users/opencontainers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencontainers/runc","description":"runc container cli tools","fork":false,"url":"https://api.github.com/repos/opencontainers/runc","forks_url":"https://api.github.com/repos/opencontainers/runc/forks","keys_url":"https://api.github.com/repos/opencontainers/runc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencontainers/runc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencontainers/runc/teams","hooks_url":"https://api.github.com/repos/opencontainers/runc/hooks","issue_events_url":"https://api.github.com/repos/opencontainers/runc/issues/events{/number}","events_url":"https://api.github.com/repos/opencontainers/runc/events","assignees_url":"https://api.github.com/repos/opencontainers/runc/assignees{/user}","branches_url":"https://api.github.com/repos/opencontainers/runc/branches{/branch}","tags_url":"https://api.github.com/repos/opencontainers/runc/tags","blobs_url":"https://api.github.com/repos/opencontainers/runc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencontainers/runc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencontainers/runc/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencontainers/runc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencontainers/runc/statuses/{sha}","languages_url":"https://api.github.com/repos/opencontainers/runc/languages","stargazers_url":"https://api.github.com/repos/opencontainers/runc/stargazers","contributors_url":"https://api.github.com/repos/opencontainers/runc/contributors","subscribers_url":"https://api.github.com/repos/opencontainers/runc/subscribers","subscription_url":"https://api.github.com/repos/opencontainers/runc/subscription","commits_url":"https://api.github.com/repos/opencontainers/runc/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencontainers/runc/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencontainers/runc/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencontainers/runc/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencontainers/runc/contents/{+path}","compare_url":"https://api.github.com/repos/opencontainers/runc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencontainers/runc/merges","archive_url":"https://api.github.com/repos/opencontainers/runc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencontainers/runc/downloads","issues_url":"https://api.github.com/repos/opencontainers/runc/issues{/number}","pulls_url":"https://api.github.com/repos/opencontainers/runc/pulls{/number}","milestones_url":"https://api.github.com/repos/opencontainers/runc/milestones{/number}","notifications_url":"https://api.github.com/repos/opencontainers/runc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencontainers/runc/labels{/name}","releases_url":"https://api.github.com/repos/opencontainers/runc/releases{/id}","deployments_url":"https://api.github.com/repos/opencontainers/runc/deployments","created_at":"2015-06-05T23:30:45Z","updated_at":"2016-03-09T17:55:51Z","pushed_at":"2016-03-09T19:08:54Z","git_url":"git://github.com/opencontainers/runc.git","ssh_url":"git@github.com:opencontainers/runc.git","clone_url":"https://github.com/opencontainers/runc.git","svn_url":"https://github.com/opencontainers/runc","homepage":"","size":4862,"stargazers_count":2568,"watchers_count":2568,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":316,"mirror_url":null,"open_issues_count":43,"forks":316,"open_issues":43,"watchers":2568,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/628"},"html":{"href":"https://github.com/opencontainers/runc/pull/628"},"issue":{"href":"https://api.github.com/repos/opencontainers/runc/issues/628"},"comments":{"href":"https://api.github.com/repos/opencontainers/runc/issues/628/comments"},"review_comments":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/628/comments"},"review_comment":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/628/commits"},"statuses":{"href":"https://api.github.com/repos/opencontainers/runc/statuses/044e2985071eca89377f8ff7c53cbb5f7859b879"}}}}