{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments/38094311","id":38094311,"diff_hunk":"@@ -91,24 +98,36 @@ def exec(*args)\n     @start = Time.now\n     safe_system SANDBOX_EXEC, \"-f\", seatbelt.path, *args\n   rescue\n-    if ARGV.verbose?\n-      ohai \"Sandbox profile:\"\n-      puts @profile.dump\n-    end\n+    @failed = true\n     raise\n   ensure\n     seatbelt.unlink\n-    unless @log.nil?\n+    if @log\n       sleep 0.1 # wait for a bit to let syslog catch up the latest events.\n       syslog_args = %W[\n-        -F '$((Time)(local))\\ $(Sender)[$(PID)]:\\ $Message'\n+        -F $((Time)(local))\\ $(Sender)[$(PID)]:\\ $(Message)\n         -k Time ge #{@start.to_i}\n+        -k Message S deny\n         -k Sender kernel\n         -o\n         -k Time ge #{@start.to_i}\n+        -k Message S deny\n         -k Sender sandboxd\n       ]\n-      quiet_system \"syslog #{syslog_args * \" \"} | grep deny > #{@log}\"\n+      logs = Utils.popen_read(\"syslog\", *syslog_args)\n+      unless logs.empty?\n+        @log.write Sandbox.log_warning_message\n+        @log.write logs","path":"Library/Homebrew/sandbox.rb","position":46,"original_position":46,"commit_id":"19d17bf4b6933306fdea5ba226d32fe373ecfa94","original_commit_id":"19d17bf4b6933306fdea5ba226d32fe373ecfa94","user":{"login":"mikemcquaid","id":125011,"avatar_url":"https://avatars.githubusercontent.com/u/125011?v=3","gravatar_id":"","url":"https://api.github.com/users/mikemcquaid","html_url":"https://github.com/mikemcquaid","followers_url":"https://api.github.com/users/mikemcquaid/followers","following_url":"https://api.github.com/users/mikemcquaid/following{/other_user}","gists_url":"https://api.github.com/users/mikemcquaid/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemcquaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemcquaid/subscriptions","organizations_url":"https://api.github.com/users/mikemcquaid/orgs","repos_url":"https://api.github.com/users/mikemcquaid/repos","events_url":"https://api.github.com/users/mikemcquaid/events{/privacy}","received_events_url":"https://api.github.com/users/mikemcquaid/received_events","type":"User","site_admin":true},"body":"Can we `grep` this for any string or is there no prefix?","created_at":"2015-08-27T13:27:59Z","updated_at":"2015-08-27T13:27:59Z","html_url":"https://github.com/Homebrew/homebrew/pull/43325#discussion_r38094311","pull_request_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/43325","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments/38094311"},"html":{"href":"https://github.com/Homebrew/homebrew/pull/43325#discussion_r38094311"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/43325"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/43325","id":43516099,"html_url":"https://github.com/Homebrew/homebrew/pull/43325","diff_url":"https://github.com/Homebrew/homebrew/pull/43325.diff","patch_url":"https://github.com/Homebrew/homebrew/pull/43325.patch","issue_url":"https://api.github.com/repos/Homebrew/homebrew/issues/43325","number":43325,"state":"open","locked":false,"title":"sandbox: better log output","user":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"body":"* use syslog filter instead of grep.\r\n* output sandbox log to stdout when verbose and failed.\r\n* output nothing if sandbox log is empty.\r\n\r\ncc @mikemcquaid ","created_at":"2015-08-27T13:22:30Z","updated_at":"2015-08-27T13:27:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"095044f9816231ec8e07544274a0dbfd797abf0a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/43325/commits","review_comments_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/43325/comments","review_comment_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/issues/43325/comments","statuses_url":"https://api.github.com/repos/Homebrew/homebrew/statuses/19d17bf4b6933306fdea5ba226d32fe373ecfa94","head":{"label":"xu-cheng:sandbox-log","ref":"sandbox-log","sha":"19d17bf4b6933306fdea5ba226d32fe373ecfa94","user":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"repo":{"id":17541180,"name":"homebrew","full_name":"xu-cheng/homebrew","owner":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xu-cheng/homebrew","description":":beer: The missing package manager for OS X.","fork":true,"url":"https://api.github.com/repos/xu-cheng/homebrew","forks_url":"https://api.github.com/repos/xu-cheng/homebrew/forks","keys_url":"https://api.github.com/repos/xu-cheng/homebrew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xu-cheng/homebrew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xu-cheng/homebrew/teams","hooks_url":"https://api.github.com/repos/xu-cheng/homebrew/hooks","issue_events_url":"https://api.github.com/repos/xu-cheng/homebrew/issues/events{/number}","events_url":"https://api.github.com/repos/xu-cheng/homebrew/events","assignees_url":"https://api.github.com/repos/xu-cheng/homebrew/assignees{/user}","branches_url":"https://api.github.com/repos/xu-cheng/homebrew/branches{/branch}","tags_url":"https://api.github.com/repos/xu-cheng/homebrew/tags","blobs_url":"https://api.github.com/repos/xu-cheng/homebrew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xu-cheng/homebrew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xu-cheng/homebrew/git/refs{/sha}","trees_url":"https://api.github.com/repos/xu-cheng/homebrew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xu-cheng/homebrew/statuses/{sha}","languages_url":"https://api.github.com/repos/xu-cheng/homebrew/languages","stargazers_url":"https://api.github.com/repos/xu-cheng/homebrew/stargazers","contributors_url":"https://api.github.com/repos/xu-cheng/homebrew/contributors","subscribers_url":"https://api.github.com/repos/xu-cheng/homebrew/subscribers","subscription_url":"https://api.github.com/repos/xu-cheng/homebrew/subscription","commits_url":"https://api.github.com/repos/xu-cheng/homebrew/commits{/sha}","git_commits_url":"https://api.github.com/repos/xu-cheng/homebrew/git/commits{/sha}","comments_url":"https://api.github.com/repos/xu-cheng/homebrew/comments{/number}","issue_comment_url":"https://api.github.com/repos/xu-cheng/homebrew/issues/comments{/number}","contents_url":"https://api.github.com/repos/xu-cheng/homebrew/contents/{+path}","compare_url":"https://api.github.com/repos/xu-cheng/homebrew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xu-cheng/homebrew/merges","archive_url":"https://api.github.com/repos/xu-cheng/homebrew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xu-cheng/homebrew/downloads","issues_url":"https://api.github.com/repos/xu-cheng/homebrew/issues{/number}","pulls_url":"https://api.github.com/repos/xu-cheng/homebrew/pulls{/number}","milestones_url":"https://api.github.com/repos/xu-cheng/homebrew/milestones{/number}","notifications_url":"https://api.github.com/repos/xu-cheng/homebrew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xu-cheng/homebrew/labels{/name}","releases_url":"https://api.github.com/repos/xu-cheng/homebrew/releases{/id}","created_at":"2014-03-08T12:05:07Z","updated_at":"2015-05-08T08:19:34Z","pushed_at":"2015-08-27T13:22:15Z","git_url":"git://github.com/xu-cheng/homebrew.git","ssh_url":"git@github.com:xu-cheng/homebrew.git","clone_url":"https://github.com/xu-cheng/homebrew.git","svn_url":"https://github.com/xu-cheng/homebrew","homepage":"http://brew.sh","size":54536,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"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":"Homebrew:master","ref":"master","sha":"3b98a75802024d40dc7b3b125d33fe6644e12e7a","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"repo":{"id":206084,"name":"homebrew","full_name":"Homebrew/homebrew","owner":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Homebrew/homebrew","description":":beer: The missing package manager for OS X.","fork":false,"url":"https://api.github.com/repos/Homebrew/homebrew","forks_url":"https://api.github.com/repos/Homebrew/homebrew/forks","keys_url":"https://api.github.com/repos/Homebrew/homebrew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/homebrew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/homebrew/teams","hooks_url":"https://api.github.com/repos/Homebrew/homebrew/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/homebrew/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/homebrew/events","assignees_url":"https://api.github.com/repos/Homebrew/homebrew/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/homebrew/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/homebrew/tags","blobs_url":"https://api.github.com/repos/Homebrew/homebrew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/homebrew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/homebrew/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/homebrew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/homebrew/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/homebrew/languages","stargazers_url":"https://api.github.com/repos/Homebrew/homebrew/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/homebrew/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/homebrew/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/homebrew/subscription","commits_url":"https://api.github.com/repos/Homebrew/homebrew/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/homebrew/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/homebrew/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/homebrew/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/homebrew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/homebrew/merges","archive_url":"https://api.github.com/repos/Homebrew/homebrew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/homebrew/downloads","issues_url":"https://api.github.com/repos/Homebrew/homebrew/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/homebrew/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/homebrew/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/homebrew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/homebrew/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/homebrew/releases{/id}","created_at":"2009-05-20T19:38:37Z","updated_at":"2015-08-27T09:56:17Z","pushed_at":"2015-08-27T13:22:30Z","git_url":"git://github.com/Homebrew/homebrew.git","ssh_url":"git@github.com:Homebrew/homebrew.git","clone_url":"https://github.com/Homebrew/homebrew.git","svn_url":"https://github.com/Homebrew/homebrew","homepage":"http://brew.sh","size":1589684,"stargazers_count":24864,"watchers_count":24864,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":12504,"mirror_url":null,"open_issues_count":386,"forks":12504,"open_issues":386,"watchers":24864,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/43325"},"html":{"href":"https://github.com/Homebrew/homebrew/pull/43325"},"issue":{"href":"https://api.github.com/repos/Homebrew/homebrew/issues/43325"},"comments":{"href":"https://api.github.com/repos/Homebrew/homebrew/issues/43325/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/43325/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/43325/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/homebrew/statuses/19d17bf4b6933306fdea5ba226d32fe373ecfa94"}}}}