{"action":"created","comment":{"url":"https://api.github.com/repos/laravel/valet/pulls/comments/274747945","pull_request_review_id":225881981,"id":274747945,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI3NDc0Nzk0NQ==","diff_hunk":"@@ -289,6 +289,61 @@\n     })->descriptions('Change the version of php used by valet', [\n         'phpVersion' => 'The PHP version you want to use, e.g php@7.2',\n     ]);\n+\n+    /**\n+     * Tail log files.\n+     */\n+    $app->command('logs [-f|--follow] [-l|--lines=] [key]', function ($follow, $lines, $key = null) {\n+        $defaultLogs = [\n+            'php' => VALET_HOME_PATH.'/Log/php.log',\n+            'php-fpm' => '/usr/local/var/log/php-fpm.log',\n+            'nginx' => VALET_HOME_PATH.'/Log/nginx-error.log',\n+            'mysql' => VALET_HOME_PATH.'/Log/mysql.log',\n+            'mailhog' => '/usr/local/var/log/mailhog.log',\n+            'redis' => '/usr/local/var/log/redis.log',\n+        ];\n+\n+        $configLogs = data_get(Configuration::read(), 'logs');\n+        if (!is_array($configLogs)) $configLogs = [];\n+\n+        $logs = collect(array_merge($defaultLogs, $configLogs))->sortKeys();\n+\n+        if (!$key) {\n+            info(implode(PHP_EOL, [\n+                'Here are the logs you might be interested in.',","path":"cli/valet.php","position":null,"original_position":25,"commit_id":"cb1136e7a616b9c0231e99f95d23beb5686b0a0c","original_commit_id":"44ab8354c79b84ffb4130349c740e10d2feaa52d","user":{"login":"furey","id":1914481,"node_id":"MDQ6VXNlcjE5MTQ0ODE=","avatar_url":"https://avatars2.githubusercontent.com/u/1914481?v=4","gravatar_id":"","url":"https://api.github.com/users/furey","html_url":"https://github.com/furey","followers_url":"https://api.github.com/users/furey/followers","following_url":"https://api.github.com/users/furey/following{/other_user}","gists_url":"https://api.github.com/users/furey/gists{/gist_id}","starred_url":"https://api.github.com/users/furey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/furey/subscriptions","organizations_url":"https://api.github.com/users/furey/orgs","repos_url":"https://api.github.com/users/furey/repos","events_url":"https://api.github.com/users/furey/events{/privacy}","received_events_url":"https://api.github.com/users/furey/received_events","type":"User","site_admin":false},"body":"Done! (cb1136e7a616b9c0231e99f95d23beb5686b0a0c)","created_at":"2019-04-12T03:20:38Z","updated_at":"2019-04-12T03:20:39Z","html_url":"https://github.com/laravel/valet/pull/757#discussion_r274747945","pull_request_url":"https://api.github.com/repos/laravel/valet/pulls/757","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/laravel/valet/pulls/comments/274747945"},"html":{"href":"https://github.com/laravel/valet/pull/757#discussion_r274747945"},"pull_request":{"href":"https://api.github.com/repos/laravel/valet/pulls/757"}},"in_reply_to_id":274547618},"pull_request":{"url":"https://api.github.com/repos/laravel/valet/pulls/757","id":267289170,"node_id":"MDExOlB1bGxSZXF1ZXN0MjY3Mjg5MTcw","html_url":"https://github.com/laravel/valet/pull/757","diff_url":"https://github.com/laravel/valet/pull/757.diff","patch_url":"https://github.com/laravel/valet/pull/757.patch","issue_url":"https://api.github.com/repos/laravel/valet/issues/757","number":757,"state":"open","locked":false,"title":"#548 Refinements (\"valet logs\" Command)","user":{"login":"furey","id":1914481,"node_id":"MDQ6VXNlcjE5MTQ0ODE=","avatar_url":"https://avatars2.githubusercontent.com/u/1914481?v=4","gravatar_id":"","url":"https://api.github.com/users/furey","html_url":"https://github.com/furey","followers_url":"https://api.github.com/users/furey/followers","following_url":"https://api.github.com/users/furey/following{/other_user}","gists_url":"https://api.github.com/users/furey/gists{/gist_id}","starred_url":"https://api.github.com/users/furey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/furey/subscriptions","organizations_url":"https://api.github.com/users/furey/orgs","repos_url":"https://api.github.com/users/furey/repos","events_url":"https://api.github.com/users/furey/events{/privacy}","received_events_url":"https://api.github.com/users/furey/received_events","type":"User","site_admin":false},"body":"This PR is submitted in response to @mattstauffer's recent tweet regarding @gahlawat's #548:\r\n\r\n[<img width=\"591\" alt=\"tweet\" src=\"https://user-images.githubusercontent.com/1914481/55528457-a90b4400-56e8-11e9-9006-fafb8401c19a.png\">\r\n](https://twitter.com/stauffermatt/status/1113538473976324105)\r\n\r\nBy default, the `logs` command tails Valet's `/Log/nginx-error.log` file:\r\n\r\n```\r\nvalet logs\r\n```\r\n\r\nTo tail **custom** log files, add relevant `\"logs\"` key/path values to `~/.config/valet/config.json`…\r\n\r\n```\r\n{\r\n    \"tld\": \"test\",\r\n    \"paths\": [\r\n        \"…\"\r\n    ],\r\n    \"logs\": {\r\n        \"nginx-access\": \"/path/to/nginx-access.log\",\r\n        \"php-error\": \"/path/to/php-fpm-errors.log\",\r\n        \"dnsmasq\": \"/path/to/dnsmasq.log\",\r\n        \"etc\": \"…\"\r\n    }\r\n}\r\n```\r\n\r\n…then pass the relevant `\"logs\"` key when calling the `logs` command:\r\n\r\n```\r\nvalet logs nginx-access\r\nvalet logs php-error\r\nvalet logs dnsmasq\r\n```\r\n\r\nTo **follow** the tailed log file, pass the `-f|--follow` flag:\r\n\r\n```\r\nvalet logs -f\r\nvalet logs --follow\r\n```\r\n\r\nTo **restrict** the number of tailed lines, pass the `--lines` flag (`-n` was taken):\r\n\r\n```\r\nvalet logs --lines 1\r\nvalet logs --lines=1\r\n```\r\n\r\nHope these tweaks add the refinement you're looking for.\r\n\r\nCheers!\r\n\r\n🤓🤞","created_at":"2019-04-04T04:16:52Z","updated_at":"2019-04-12T03:20:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fcef7a5309d185b58884f137774c44f10b69e84","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/laravel/valet/pulls/757/commits","review_comments_url":"https://api.github.com/repos/laravel/valet/pulls/757/comments","review_comment_url":"https://api.github.com/repos/laravel/valet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/laravel/valet/issues/757/comments","statuses_url":"https://api.github.com/repos/laravel/valet/statuses/cb1136e7a616b9c0231e99f95d23beb5686b0a0c","head":{"label":"furey:pull-548-refinements","ref":"pull-548-refinements","sha":"cb1136e7a616b9c0231e99f95d23beb5686b0a0c","user":{"login":"furey","id":1914481,"node_id":"MDQ6VXNlcjE5MTQ0ODE=","avatar_url":"https://avatars2.githubusercontent.com/u/1914481?v=4","gravatar_id":"","url":"https://api.github.com/users/furey","html_url":"https://github.com/furey","followers_url":"https://api.github.com/users/furey/followers","following_url":"https://api.github.com/users/furey/following{/other_user}","gists_url":"https://api.github.com/users/furey/gists{/gist_id}","starred_url":"https://api.github.com/users/furey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/furey/subscriptions","organizations_url":"https://api.github.com/users/furey/orgs","repos_url":"https://api.github.com/users/furey/repos","events_url":"https://api.github.com/users/furey/events{/privacy}","received_events_url":"https://api.github.com/users/furey/received_events","type":"User","site_admin":false},"repo":{"id":179406304,"node_id":"MDEwOlJlcG9zaXRvcnkxNzk0MDYzMDQ=","name":"valet","full_name":"furey/valet","private":false,"owner":{"login":"furey","id":1914481,"node_id":"MDQ6VXNlcjE5MTQ0ODE=","avatar_url":"https://avatars2.githubusercontent.com/u/1914481?v=4","gravatar_id":"","url":"https://api.github.com/users/furey","html_url":"https://github.com/furey","followers_url":"https://api.github.com/users/furey/followers","following_url":"https://api.github.com/users/furey/following{/other_user}","gists_url":"https://api.github.com/users/furey/gists{/gist_id}","starred_url":"https://api.github.com/users/furey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/furey/subscriptions","organizations_url":"https://api.github.com/users/furey/orgs","repos_url":"https://api.github.com/users/furey/repos","events_url":"https://api.github.com/users/furey/events{/privacy}","received_events_url":"https://api.github.com/users/furey/received_events","type":"User","site_admin":false},"html_url":"https://github.com/furey/valet","description":null,"fork":true,"url":"https://api.github.com/repos/furey/valet","forks_url":"https://api.github.com/repos/furey/valet/forks","keys_url":"https://api.github.com/repos/furey/valet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/furey/valet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/furey/valet/teams","hooks_url":"https://api.github.com/repos/furey/valet/hooks","issue_events_url":"https://api.github.com/repos/furey/valet/issues/events{/number}","events_url":"https://api.github.com/repos/furey/valet/events","assignees_url":"https://api.github.com/repos/furey/valet/assignees{/user}","branches_url":"https://api.github.com/repos/furey/valet/branches{/branch}","tags_url":"https://api.github.com/repos/furey/valet/tags","blobs_url":"https://api.github.com/repos/furey/valet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/furey/valet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/furey/valet/git/refs{/sha}","trees_url":"https://api.github.com/repos/furey/valet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/furey/valet/statuses/{sha}","languages_url":"https://api.github.com/repos/furey/valet/languages","stargazers_url":"https://api.github.com/repos/furey/valet/stargazers","contributors_url":"https://api.github.com/repos/furey/valet/contributors","subscribers_url":"https://api.github.com/repos/furey/valet/subscribers","subscription_url":"https://api.github.com/repos/furey/valet/subscription","commits_url":"https://api.github.com/repos/furey/valet/commits{/sha}","git_commits_url":"https://api.github.com/repos/furey/valet/git/commits{/sha}","comments_url":"https://api.github.com/repos/furey/valet/comments{/number}","issue_comment_url":"https://api.github.com/repos/furey/valet/issues/comments{/number}","contents_url":"https://api.github.com/repos/furey/valet/contents/{+path}","compare_url":"https://api.github.com/repos/furey/valet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/furey/valet/merges","archive_url":"https://api.github.com/repos/furey/valet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/furey/valet/downloads","issues_url":"https://api.github.com/repos/furey/valet/issues{/number}","pulls_url":"https://api.github.com/repos/furey/valet/pulls{/number}","milestones_url":"https://api.github.com/repos/furey/valet/milestones{/number}","notifications_url":"https://api.github.com/repos/furey/valet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/furey/valet/labels{/name}","releases_url":"https://api.github.com/repos/furey/valet/releases{/id}","deployments_url":"https://api.github.com/repos/furey/valet/deployments","created_at":"2019-04-04T02:26:12Z","updated_at":"2019-04-04T02:26:16Z","pushed_at":"2019-04-12T03:11:55Z","git_url":"git://github.com/furey/valet.git","ssh_url":"git@github.com:furey/valet.git","clone_url":"https://github.com/furey/valet.git","svn_url":"https://github.com/furey/valet","homepage":null,"size":35538,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"laravel:master","ref":"master","sha":"1e3e37179b24958a03a92b19f351b04736ff292c","user":{"login":"laravel","id":958072,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1ODA3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/958072?v=4","gravatar_id":"","url":"https://api.github.com/users/laravel","html_url":"https://github.com/laravel","followers_url":"https://api.github.com/users/laravel/followers","following_url":"https://api.github.com/users/laravel/following{/other_user}","gists_url":"https://api.github.com/users/laravel/gists{/gist_id}","starred_url":"https://api.github.com/users/laravel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laravel/subscriptions","organizations_url":"https://api.github.com/users/laravel/orgs","repos_url":"https://api.github.com/users/laravel/repos","events_url":"https://api.github.com/users/laravel/events{/privacy}","received_events_url":"https://api.github.com/users/laravel/received_events","type":"Organization","site_admin":false},"repo":{"id":58001483,"node_id":"MDEwOlJlcG9zaXRvcnk1ODAwMTQ4Mw==","name":"valet","full_name":"laravel/valet","private":false,"owner":{"login":"laravel","id":958072,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1ODA3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/958072?v=4","gravatar_id":"","url":"https://api.github.com/users/laravel","html_url":"https://github.com/laravel","followers_url":"https://api.github.com/users/laravel/followers","following_url":"https://api.github.com/users/laravel/following{/other_user}","gists_url":"https://api.github.com/users/laravel/gists{/gist_id}","starred_url":"https://api.github.com/users/laravel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laravel/subscriptions","organizations_url":"https://api.github.com/users/laravel/orgs","repos_url":"https://api.github.com/users/laravel/repos","events_url":"https://api.github.com/users/laravel/events{/privacy}","received_events_url":"https://api.github.com/users/laravel/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/laravel/valet","description":null,"fork":false,"url":"https://api.github.com/repos/laravel/valet","forks_url":"https://api.github.com/repos/laravel/valet/forks","keys_url":"https://api.github.com/repos/laravel/valet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laravel/valet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laravel/valet/teams","hooks_url":"https://api.github.com/repos/laravel/valet/hooks","issue_events_url":"https://api.github.com/repos/laravel/valet/issues/events{/number}","events_url":"https://api.github.com/repos/laravel/valet/events","assignees_url":"https://api.github.com/repos/laravel/valet/assignees{/user}","branches_url":"https://api.github.com/repos/laravel/valet/branches{/branch}","tags_url":"https://api.github.com/repos/laravel/valet/tags","blobs_url":"https://api.github.com/repos/laravel/valet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laravel/valet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laravel/valet/git/refs{/sha}","trees_url":"https://api.github.com/repos/laravel/valet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laravel/valet/statuses/{sha}","languages_url":"https://api.github.com/repos/laravel/valet/languages","stargazers_url":"https://api.github.com/repos/laravel/valet/stargazers","contributors_url":"https://api.github.com/repos/laravel/valet/contributors","subscribers_url":"https://api.github.com/repos/laravel/valet/subscribers","subscription_url":"https://api.github.com/repos/laravel/valet/subscription","commits_url":"https://api.github.com/repos/laravel/valet/commits{/sha}","git_commits_url":"https://api.github.com/repos/laravel/valet/git/commits{/sha}","comments_url":"https://api.github.com/repos/laravel/valet/comments{/number}","issue_comment_url":"https://api.github.com/repos/laravel/valet/issues/comments{/number}","contents_url":"https://api.github.com/repos/laravel/valet/contents/{+path}","compare_url":"https://api.github.com/repos/laravel/valet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laravel/valet/merges","archive_url":"https://api.github.com/repos/laravel/valet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laravel/valet/downloads","issues_url":"https://api.github.com/repos/laravel/valet/issues{/number}","pulls_url":"https://api.github.com/repos/laravel/valet/pulls{/number}","milestones_url":"https://api.github.com/repos/laravel/valet/milestones{/number}","notifications_url":"https://api.github.com/repos/laravel/valet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laravel/valet/labels{/name}","releases_url":"https://api.github.com/repos/laravel/valet/releases{/id}","deployments_url":"https://api.github.com/repos/laravel/valet/deployments","created_at":"2016-05-03T21:02:59Z","updated_at":"2019-04-11T19:46:23Z","pushed_at":"2019-04-12T03:11:57Z","git_url":"git://github.com/laravel/valet.git","ssh_url":"git@github.com:laravel/valet.git","clone_url":"https://github.com/laravel/valet.git","svn_url":"https://github.com/laravel/valet","homepage":null,"size":35554,"stargazers_count":1504,"watchers_count":1504,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":448,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":79,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":448,"open_issues":79,"watchers":1504,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/laravel/valet/pulls/757"},"html":{"href":"https://github.com/laravel/valet/pull/757"},"issue":{"href":"https://api.github.com/repos/laravel/valet/issues/757"},"comments":{"href":"https://api.github.com/repos/laravel/valet/issues/757/comments"},"review_comments":{"href":"https://api.github.com/repos/laravel/valet/pulls/757/comments"},"review_comment":{"href":"https://api.github.com/repos/laravel/valet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/laravel/valet/pulls/757/commits"},"statuses":{"href":"https://api.github.com/repos/laravel/valet/statuses/cb1136e7a616b9c0231e99f95d23beb5686b0a0c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"furey"}}