{"action":"created","comment":{"url":"https://api.github.com/repos/laravel/framework/pulls/comments/139287581","pull_request_review_id":63204329,"id":139287581,"diff_hunk":"@@ -0,0 +1,154 @@\n+<?php\n+\n+namespace Illuminate\\Log;\n+\n+use Psr\\Log\\AbstractLogger;\n+use Psr\\Log\\LoggerInterface;\n+use Illuminate\\Contracts\\Events\\Dispatcher;\n+\n+class LogManager extends AbstractLogger implements LoggerInterface\n+{\n+    /**\n+     * The available log channels.\n+     *\n+     * @var \\Illuminate\\Log\\Channel[]\n+     */\n+    protected $channels = [];\n+\n+    /**\n+     * The default log channels.\n+     *\n+     * @var string[]\n+     */\n+    protected $defaultChannels = [];\n+\n+    /**\n+     * The events dispatcher.\n+     *\n+     * @var \\Illuminate\\Contracts\\Events\\Dispatcher\n+     */\n+    protected $events;\n+\n+    /**\n+     * Create the LogManager.\n+     *\n+     * @param  \\Illuminate\\Contracts\\Events\\Dispatcher  $events\n+     */\n+    public function __construct(Dispatcher $events)\n+    {\n+        $this->events = $events;\n+    }\n+\n+    /**\n+     * Retrieve a channel to use for logging.\n+     *\n+     * @param  string  $channel\n+     * @return \\Illuminate\\Log\\Channel\n+     */\n+    public function to($channel)\n+    {\n+        return $this->resolveChannel($channel);\n+    }\n+\n+    /**\n+     * Attach an event listener to log a certain event.\n+     *\n+     * @param  string|array  $event\n+     * @param  string  $level\n+     * @param  null|array|string  $channels\n+     * @return \\Illuminate\\Log\\EventLogger|\\Illuminate\\Log\\Channel\n+     */\n+    public function event($event, $level = 'debug', $channels = null)\n+    {\n+        $logger = new EventLogger($this, $this->events, $event, $level);\n+\n+        if (! $channels) {\n+            return $logger;\n+        }\n+\n+        return $logger->to($channels);\n+    }\n+\n+    /**\n+     * Resolve a channel by name.\n+     *\n+     * @param  string  $channel\n+     * @return \\Illuminate\\Log\\Channel\n+     *\n+     * @throws \\Exception","path":"src/Illuminate/Log/LogManager.php","position":78,"original_position":78,"commit_id":"4ed4f99aa39379ccc1ffc4cce3779e100e65acf5","original_commit_id":"4ed4f99aa39379ccc1ffc4cce3779e100e65acf5","user":{"login":"GrahamCampbell","id":2829600,"avatar_url":"https://avatars1.githubusercontent.com/u/2829600?v=4","gravatar_id":"","url":"https://api.github.com/users/GrahamCampbell","html_url":"https://github.com/GrahamCampbell","followers_url":"https://api.github.com/users/GrahamCampbell/followers","following_url":"https://api.github.com/users/GrahamCampbell/following{/other_user}","gists_url":"https://api.github.com/users/GrahamCampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamCampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamCampbell/subscriptions","organizations_url":"https://api.github.com/users/GrahamCampbell/orgs","repos_url":"https://api.github.com/users/GrahamCampbell/repos","events_url":"https://api.github.com/users/GrahamCampbell/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamCampbell/received_events","type":"User","site_admin":false},"body":"Please make this doc more specific.","created_at":"2017-09-16T14:16:59Z","updated_at":"2017-09-16T14:17:02Z","html_url":"https://github.com/laravel/framework/pull/21152#discussion_r139287581","pull_request_url":"https://api.github.com/repos/laravel/framework/pulls/21152","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/laravel/framework/pulls/comments/139287581"},"html":{"href":"https://github.com/laravel/framework/pull/21152#discussion_r139287581"},"pull_request":{"href":"https://api.github.com/repos/laravel/framework/pulls/21152"}}},"pull_request":{"url":"https://api.github.com/repos/laravel/framework/pulls/21152","id":140675780,"html_url":"https://github.com/laravel/framework/pull/21152","diff_url":"https://github.com/laravel/framework/pull/21152.diff","patch_url":"https://github.com/laravel/framework/pull/21152.patch","issue_url":"https://api.github.com/repos/laravel/framework/issues/21152","number":21152,"state":"open","locked":false,"title":"[5.6] Logging, as it should be","user":{"login":"phroggyy","id":7256451,"avatar_url":"https://avatars1.githubusercontent.com/u/7256451?v=4","gravatar_id":"","url":"https://api.github.com/users/phroggyy","html_url":"https://github.com/phroggyy","followers_url":"https://api.github.com/users/phroggyy/followers","following_url":"https://api.github.com/users/phroggyy/following{/other_user}","gists_url":"https://api.github.com/users/phroggyy/gists{/gist_id}","starred_url":"https://api.github.com/users/phroggyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phroggyy/subscriptions","organizations_url":"https://api.github.com/users/phroggyy/orgs","repos_url":"https://api.github.com/users/phroggyy/repos","events_url":"https://api.github.com/users/phroggyy/events{/privacy}","received_events_url":"https://api.github.com/users/phroggyy/received_events","type":"User","site_admin":false},"body":"This PR rewrites *all* of Laravel's existing logging system. With the new code, users are given the ability to configure their logging setup, and gives much greater flexibility when it comes to third party integration.\r\n\r\n*Features:*\r\n\r\n- channels: you can have multiple log \"channels\", allowing you to send certain messages to certain channels. This lets you separate logging into multiple concerns (i.e request logging can go into a `requests` channel, which writes to a daily log file, while your default log writes to `laravel.log`)\r\n- middleware: you can specify arbitrary middleware through which the record will pass before being passed onto Monolog. By default, there's a middleware to reject records that are under a minimum log level; i.e log only error or greater to the `errors` channel, log only `emergency` or greater to the `bedroom-lights` channel\r\n- event logging: `Log::event('some.event')->to('events')` will send a log record to your `events` channel whenever the `some.event` event occurs. The logger will attach all event data it can find (yes, even on class events, it will grab properties)\r\n\r\nThis is a WIP, still need a few more tests and some cleanup\r\n\r\nThis is still missing the syslog and errorlog handlers","created_at":"2017-09-12T20:30:53Z","updated_at":"2017-09-16T14:17:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27738347c50c3e83d722c9ac978091370e1e9b11","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/laravel/framework/pulls/21152/commits","review_comments_url":"https://api.github.com/repos/laravel/framework/pulls/21152/comments","review_comment_url":"https://api.github.com/repos/laravel/framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/laravel/framework/issues/21152/comments","statuses_url":"https://api.github.com/repos/laravel/framework/statuses/4ed4f99aa39379ccc1ffc4cce3779e100e65acf5","head":{"label":"phroggyy:5.6-feat/logging","ref":"5.6-feat/logging","sha":"4ed4f99aa39379ccc1ffc4cce3779e100e65acf5","user":{"login":"phroggyy","id":7256451,"avatar_url":"https://avatars1.githubusercontent.com/u/7256451?v=4","gravatar_id":"","url":"https://api.github.com/users/phroggyy","html_url":"https://github.com/phroggyy","followers_url":"https://api.github.com/users/phroggyy/followers","following_url":"https://api.github.com/users/phroggyy/following{/other_user}","gists_url":"https://api.github.com/users/phroggyy/gists{/gist_id}","starred_url":"https://api.github.com/users/phroggyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phroggyy/subscriptions","organizations_url":"https://api.github.com/users/phroggyy/orgs","repos_url":"https://api.github.com/users/phroggyy/repos","events_url":"https://api.github.com/users/phroggyy/events{/privacy}","received_events_url":"https://api.github.com/users/phroggyy/received_events","type":"User","site_admin":false},"repo":{"id":39278804,"name":"framework","full_name":"phroggyy/framework","owner":{"login":"phroggyy","id":7256451,"avatar_url":"https://avatars1.githubusercontent.com/u/7256451?v=4","gravatar_id":"","url":"https://api.github.com/users/phroggyy","html_url":"https://github.com/phroggyy","followers_url":"https://api.github.com/users/phroggyy/followers","following_url":"https://api.github.com/users/phroggyy/following{/other_user}","gists_url":"https://api.github.com/users/phroggyy/gists{/gist_id}","starred_url":"https://api.github.com/users/phroggyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phroggyy/subscriptions","organizations_url":"https://api.github.com/users/phroggyy/orgs","repos_url":"https://api.github.com/users/phroggyy/repos","events_url":"https://api.github.com/users/phroggyy/events{/privacy}","received_events_url":"https://api.github.com/users/phroggyy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phroggyy/framework","description":null,"fork":true,"url":"https://api.github.com/repos/phroggyy/framework","forks_url":"https://api.github.com/repos/phroggyy/framework/forks","keys_url":"https://api.github.com/repos/phroggyy/framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phroggyy/framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phroggyy/framework/teams","hooks_url":"https://api.github.com/repos/phroggyy/framework/hooks","issue_events_url":"https://api.github.com/repos/phroggyy/framework/issues/events{/number}","events_url":"https://api.github.com/repos/phroggyy/framework/events","assignees_url":"https://api.github.com/repos/phroggyy/framework/assignees{/user}","branches_url":"https://api.github.com/repos/phroggyy/framework/branches{/branch}","tags_url":"https://api.github.com/repos/phroggyy/framework/tags","blobs_url":"https://api.github.com/repos/phroggyy/framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phroggyy/framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phroggyy/framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/phroggyy/framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phroggyy/framework/statuses/{sha}","languages_url":"https://api.github.com/repos/phroggyy/framework/languages","stargazers_url":"https://api.github.com/repos/phroggyy/framework/stargazers","contributors_url":"https://api.github.com/repos/phroggyy/framework/contributors","subscribers_url":"https://api.github.com/repos/phroggyy/framework/subscribers","subscription_url":"https://api.github.com/repos/phroggyy/framework/subscription","commits_url":"https://api.github.com/repos/phroggyy/framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/phroggyy/framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/phroggyy/framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/phroggyy/framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/phroggyy/framework/contents/{+path}","compare_url":"https://api.github.com/repos/phroggyy/framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phroggyy/framework/merges","archive_url":"https://api.github.com/repos/phroggyy/framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phroggyy/framework/downloads","issues_url":"https://api.github.com/repos/phroggyy/framework/issues{/number}","pulls_url":"https://api.github.com/repos/phroggyy/framework/pulls{/number}","milestones_url":"https://api.github.com/repos/phroggyy/framework/milestones{/number}","notifications_url":"https://api.github.com/repos/phroggyy/framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phroggyy/framework/labels{/name}","releases_url":"https://api.github.com/repos/phroggyy/framework/releases{/id}","deployments_url":"https://api.github.com/repos/phroggyy/framework/deployments","created_at":"2015-07-17T22:57:48Z","updated_at":"2015-07-17T22:57:52Z","pushed_at":"2017-09-16T13:35:20Z","git_url":"git://github.com/phroggyy/framework.git","ssh_url":"git@github.com:phroggyy/framework.git","clone_url":"https://github.com/phroggyy/framework.git","svn_url":"https://github.com/phroggyy/framework","homepage":"http://laravel.com","size":30717,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"5.1"}},"base":{"label":"laravel:master","ref":"master","sha":"2ec2e300ecaa032f7e098bf6ea69d9945f88f4b4","user":{"login":"laravel","id":958072,"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":7548986,"name":"framework","full_name":"laravel/framework","owner":{"login":"laravel","id":958072,"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},"private":false,"html_url":"https://github.com/laravel/framework","description":null,"fork":false,"url":"https://api.github.com/repos/laravel/framework","forks_url":"https://api.github.com/repos/laravel/framework/forks","keys_url":"https://api.github.com/repos/laravel/framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laravel/framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laravel/framework/teams","hooks_url":"https://api.github.com/repos/laravel/framework/hooks","issue_events_url":"https://api.github.com/repos/laravel/framework/issues/events{/number}","events_url":"https://api.github.com/repos/laravel/framework/events","assignees_url":"https://api.github.com/repos/laravel/framework/assignees{/user}","branches_url":"https://api.github.com/repos/laravel/framework/branches{/branch}","tags_url":"https://api.github.com/repos/laravel/framework/tags","blobs_url":"https://api.github.com/repos/laravel/framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laravel/framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laravel/framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/laravel/framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laravel/framework/statuses/{sha}","languages_url":"https://api.github.com/repos/laravel/framework/languages","stargazers_url":"https://api.github.com/repos/laravel/framework/stargazers","contributors_url":"https://api.github.com/repos/laravel/framework/contributors","subscribers_url":"https://api.github.com/repos/laravel/framework/subscribers","subscription_url":"https://api.github.com/repos/laravel/framework/subscription","commits_url":"https://api.github.com/repos/laravel/framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/laravel/framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/laravel/framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/laravel/framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/laravel/framework/contents/{+path}","compare_url":"https://api.github.com/repos/laravel/framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laravel/framework/merges","archive_url":"https://api.github.com/repos/laravel/framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laravel/framework/downloads","issues_url":"https://api.github.com/repos/laravel/framework/issues{/number}","pulls_url":"https://api.github.com/repos/laravel/framework/pulls{/number}","milestones_url":"https://api.github.com/repos/laravel/framework/milestones{/number}","notifications_url":"https://api.github.com/repos/laravel/framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laravel/framework/labels{/name}","releases_url":"https://api.github.com/repos/laravel/framework/releases{/id}","deployments_url":"https://api.github.com/repos/laravel/framework/deployments","created_at":"2013-01-10T21:27:28Z","updated_at":"2017-09-16T13:45:08Z","pushed_at":"2017-09-16T13:35:22Z","git_url":"git://github.com/laravel/framework.git","ssh_url":"git@github.com:laravel/framework.git","clone_url":"https://github.com/laravel/framework.git","svn_url":"https://github.com/laravel/framework","homepage":"http://laravel.com","size":30824,"stargazers_count":8033,"watchers_count":8033,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4685,"mirror_url":null,"open_issues_count":105,"forks":4685,"open_issues":105,"watchers":8033,"default_branch":"5.5"}},"_links":{"self":{"href":"https://api.github.com/repos/laravel/framework/pulls/21152"},"html":{"href":"https://github.com/laravel/framework/pull/21152"},"issue":{"href":"https://api.github.com/repos/laravel/framework/issues/21152"},"comments":{"href":"https://api.github.com/repos/laravel/framework/issues/21152/comments"},"review_comments":{"href":"https://api.github.com/repos/laravel/framework/pulls/21152/comments"},"review_comment":{"href":"https://api.github.com/repos/laravel/framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/laravel/framework/pulls/21152/commits"},"statuses":{"href":"https://api.github.com/repos/laravel/framework/statuses/4ed4f99aa39379ccc1ffc4cce3779e100e65acf5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"GrahamCampbell"}}