GitHub PullRequestReviewCommentEvent at 2014-12-03 12:05:41
Repository: monolog
Actor: Seldaek
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Seldaek/monolog/pulls/comments/21226954","id":21226954,"diff_hunk":"@@ -229,23 +229,12 @@ public function addRecord($level, $message, array $context = array())\n             $this->pushHandler(new StreamHandler('php://stderr', static::DEBUG));\n         }\n \n-        if (!static::$timezone) {\n-            static::$timezone = new \\DateTimeZone(date_default_timezone_get() ?: 'UTC');\n-        }\n+        $levelName = static::getLevelName($level);","path":"src/Monolog/Logger.php","position":7,"original_position":7,"commit_id":"ae68665460a499f7bf56e034911d923b91433693","original_commit_id":"ae68665460a499f7bf56e034911d923b91433693","user":{"login":"Seldaek","id":183678,"avatar_url":"https://avatars.githubusercontent.com/u/183678?v=3","gravatar_id":"","url":"https://api.github.com/users/Seldaek","html_url":"https://github.com/Seldaek","followers_url":"https://api.github.com/users/Seldaek/followers","following_url":"https://api.github.com/users/Seldaek/following{/other_user}","gists_url":"https://api.github.com/users/Seldaek/gists{/gist_id}","starred_url":"https://api.github.com/users/Seldaek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Seldaek/subscriptions","organizations_url":"https://api.github.com/users/Seldaek/orgs","repos_url":"https://api.github.com/users/Seldaek/repos","events_url":"https://api.github.com/users/Seldaek/events{/privacy}","received_events_url":"https://api.github.com/users/Seldaek/received_events","type":"User","site_admin":false},"body":"Why did you extract this? It's not needed in the foreach so I think it can stay inline in the `$record` creation?","created_at":"2014-12-03T12:05:41Z","updated_at":"2014-12-03T12:05:41Z","html_url":"https://github.com/Seldaek/monolog/pull/463#discussion_r21226954","pull_request_url":"https://api.github.com/repos/Seldaek/monolog/pulls/463","_links":{"self":{"href":"https://api.github.com/repos/Seldaek/monolog/pulls/comments/21226954"},"html":{"href":"https://github.com/Seldaek/monolog/pull/463#discussion_r21226954"},"pull_request":{"href":"https://api.github.com/repos/Seldaek/monolog/pulls/463"}}},"pull_request":{"url":"https://api.github.com/repos/Seldaek/monolog/pulls/463","id":25385445,"html_url":"https://github.com/Seldaek/monolog/pull/463","diff_url":"https://github.com/Seldaek/monolog/pull/463.diff","patch_url":"https://github.com/Seldaek/monolog/pull/463.patch","issue_url":"https://api.github.com/repos/Seldaek/monolog/issues/463","number":463,"state":"open","locked":false,"title":"Avoid calling expensive methods before checking if we need to","user":{"login":"edsonmedina","id":5449,"avatar_url":"https://avatars.githubusercontent.com/u/5449?v=3","gravatar_id":"","url":"https://api.github.com/users/edsonmedina","html_url":"https://github.com/edsonmedina","followers_url":"https://api.github.com/users/edsonmedina/followers","following_url":"https://api.github.com/users/edsonmedina/following{/other_user}","gists_url":"https://api.github.com/users/edsonmedina/gists{/gist_id}","starred_url":"https://api.github.com/users/edsonmedina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edsonmedina/subscriptions","organizations_url":"https://api.github.com/users/edsonmedina/orgs","repos_url":"https://api.github.com/users/edsonmedina/repos","events_url":"https://api.github.com/users/edsonmedina/events{/privacy}","received_events_url":"https://api.github.com/users/edsonmedina/received_events","type":"User","site_admin":false},"body":"There’s no need to create the full $record structure before checking for handlers. This can be called inside a loop, and Datetime::createFromFormat() is very expensive.","created_at":"2014-12-02T23:56:20Z","updated_at":"2014-12-03T12:05:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e334261896f92451bcf4f6b466198ed7410ea08b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Seldaek/monolog/pulls/463/commits","review_comments_url":"https://api.github.com/repos/Seldaek/monolog/pulls/463/comments","review_comment_url":"https://api.github.com/repos/Seldaek/monolog/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Seldaek/monolog/issues/463/comments","statuses_url":"https://api.github.com/repos/Seldaek/monolog/statuses/ae68665460a499f7bf56e034911d923b91433693","head":{"label":"edsonmedina:master","ref":"master","sha":"ae68665460a499f7bf56e034911d923b91433693","user":{"login":"edsonmedina","id":5449,"avatar_url":"https://avatars.githubusercontent.com/u/5449?v=3","gravatar_id":"","url":"https://api.github.com/users/edsonmedina","html_url":"https://github.com/edsonmedina","followers_url":"https://api.github.com/users/edsonmedina/followers","following_url":"https://api.github.com/users/edsonmedina/following{/other_user}","gists_url":"https://api.github.com/users/edsonmedina/gists{/gist_id}","starred_url":"https://api.github.com/users/edsonmedina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edsonmedina/subscriptions","organizations_url":"https://api.github.com/users/edsonmedina/orgs","repos_url":"https://api.github.com/users/edsonmedina/repos","events_url":"https://api.github.com/users/edsonmedina/events{/privacy}","received_events_url":"https://api.github.com/users/edsonmedina/received_events","type":"User","site_admin":false},"repo":{"id":27455337,"name":"monolog","full_name":"edsonmedina/monolog","owner":{"login":"edsonmedina","id":5449,"avatar_url":"https://avatars.githubusercontent.com/u/5449?v=3","gravatar_id":"","url":"https://api.github.com/users/edsonmedina","html_url":"https://github.com/edsonmedina","followers_url":"https://api.github.com/users/edsonmedina/followers","following_url":"https://api.github.com/users/edsonmedina/following{/other_user}","gists_url":"https://api.github.com/users/edsonmedina/gists{/gist_id}","starred_url":"https://api.github.com/users/edsonmedina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edsonmedina/subscriptions","organizations_url":"https://api.github.com/users/edsonmedina/orgs","repos_url":"https://api.github.com/users/edsonmedina/repos","events_url":"https://api.github.com/users/edsonmedina/events{/privacy}","received_events_url":"https://api.github.com/users/edsonmedina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edsonmedina/monolog","description":"Sends your logs to files, sockets, inboxes, databases and various web services","fork":true,"url":"https://api.github.com/repos/edsonmedina/monolog","forks_url":"https://api.github.com/repos/edsonmedina/monolog/forks","keys_url":"https://api.github.com/repos/edsonmedina/monolog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edsonmedina/monolog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edsonmedina/monolog/teams","hooks_url":"https://api.github.com/repos/edsonmedina/monolog/hooks","issue_events_url":"https://api.github.com/repos/edsonmedina/monolog/issues/events{/number}","events_url":"https://api.github.com/repos/edsonmedina/monolog/events","assignees_url":"https://api.github.com/repos/edsonmedina/monolog/assignees{/user}","branches_url":"https://api.github.com/repos/edsonmedina/monolog/branches{/branch}","tags_url":"https://api.github.com/repos/edsonmedina/monolog/tags","blobs_url":"https://api.github.com/repos/edsonmedina/monolog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edsonmedina/monolog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edsonmedina/monolog/git/refs{/sha}","trees_url":"https://api.github.com/repos/edsonmedina/monolog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edsonmedina/monolog/statuses/{sha}","languages_url":"https://api.github.com/repos/edsonmedina/monolog/languages","stargazers_url":"https://api.github.com/repos/edsonmedina/monolog/stargazers","contributors_url":"https://api.github.com/repos/edsonmedina/monolog/contributors","subscribers_url":"https://api.github.com/repos/edsonmedina/monolog/subscribers","subscription_url":"https://api.github.com/repos/edsonmedina/monolog/subscription","commits_url":"https://api.github.com/repos/edsonmedina/monolog/commits{/sha}","git_commits_url":"https://api.github.com/repos/edsonmedina/monolog/git/commits{/sha}","comments_url":"https://api.github.com/repos/edsonmedina/monolog/comments{/number}","issue_comment_url":"https://api.github.com/repos/edsonmedina/monolog/issues/comments/{number}","contents_url":"https://api.github.com/repos/edsonmedina/monolog/contents/{+path}","compare_url":"https://api.github.com/repos/edsonmedina/monolog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edsonmedina/monolog/merges","archive_url":"https://api.github.com/repos/edsonmedina/monolog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edsonmedina/monolog/downloads","issues_url":"https://api.github.com/repos/edsonmedina/monolog/issues{/number}","pulls_url":"https://api.github.com/repos/edsonmedina/monolog/pulls{/number}","milestones_url":"https://api.github.com/repos/edsonmedina/monolog/milestones{/number}","notifications_url":"https://api.github.com/repos/edsonmedina/monolog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edsonmedina/monolog/labels{/name}","releases_url":"https://api.github.com/repos/edsonmedina/monolog/releases{/id}","created_at":"2014-12-02T21:50:51Z","updated_at":"2014-12-02T23:53:55Z","pushed_at":"2014-12-02T23:53:55Z","git_url":"git://github.com/edsonmedina/monolog.git","ssh_url":"git@github.com:edsonmedina/monolog.git","clone_url":"https://github.com/edsonmedina/monolog.git","svn_url":"https://github.com/edsonmedina/monolog","homepage":"","size":4987,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"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":"Seldaek:master","ref":"master","sha":"ab41ed9a94196ce2793f400b88313918b4fc64dc","user":{"login":"Seldaek","id":183678,"avatar_url":"https://avatars.githubusercontent.com/u/183678?v=3","gravatar_id":"","url":"https://api.github.com/users/Seldaek","html_url":"https://github.com/Seldaek","followers_url":"https://api.github.com/users/Seldaek/followers","following_url":"https://api.github.com/users/Seldaek/following{/other_user}","gists_url":"https://api.github.com/users/Seldaek/gists{/gist_id}","starred_url":"https://api.github.com/users/Seldaek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Seldaek/subscriptions","organizations_url":"https://api.github.com/users/Seldaek/orgs","repos_url":"https://api.github.com/users/Seldaek/repos","events_url":"https://api.github.com/users/Seldaek/events{/privacy}","received_events_url":"https://api.github.com/users/Seldaek/received_events","type":"User","site_admin":false},"repo":{"id":1376664,"name":"monolog","full_name":"Seldaek/monolog","owner":{"login":"Seldaek","id":183678,"avatar_url":"https://avatars.githubusercontent.com/u/183678?v=3","gravatar_id":"","url":"https://api.github.com/users/Seldaek","html_url":"https://github.com/Seldaek","followers_url":"https://api.github.com/users/Seldaek/followers","following_url":"https://api.github.com/users/Seldaek/following{/other_user}","gists_url":"https://api.github.com/users/Seldaek/gists{/gist_id}","starred_url":"https://api.github.com/users/Seldaek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Seldaek/subscriptions","organizations_url":"https://api.github.com/users/Seldaek/orgs","repos_url":"https://api.github.com/users/Seldaek/repos","events_url":"https://api.github.com/users/Seldaek/events{/privacy}","received_events_url":"https://api.github.com/users/Seldaek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Seldaek/monolog","description":"Sends your logs to files, sockets, inboxes, databases and various web services","fork":false,"url":"https://api.github.com/repos/Seldaek/monolog","forks_url":"https://api.github.com/repos/Seldaek/monolog/forks","keys_url":"https://api.github.com/repos/Seldaek/monolog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Seldaek/monolog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Seldaek/monolog/teams","hooks_url":"https://api.github.com/repos/Seldaek/monolog/hooks","issue_events_url":"https://api.github.com/repos/Seldaek/monolog/issues/events{/number}","events_url":"https://api.github.com/repos/Seldaek/monolog/events","assignees_url":"https://api.github.com/repos/Seldaek/monolog/assignees{/user}","branches_url":"https://api.github.com/repos/Seldaek/monolog/branches{/branch}","tags_url":"https://api.github.com/repos/Seldaek/monolog/tags","blobs_url":"https://api.github.com/repos/Seldaek/monolog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Seldaek/monolog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Seldaek/monolog/git/refs{/sha}","trees_url":"https://api.github.com/repos/Seldaek/monolog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Seldaek/monolog/statuses/{sha}","languages_url":"https://api.github.com/repos/Seldaek/monolog/languages","stargazers_url":"https://api.github.com/repos/Seldaek/monolog/stargazers","contributors_url":"https://api.github.com/repos/Seldaek/monolog/contributors","subscribers_url":"https://api.github.com/repos/Seldaek/monolog/subscribers","subscription_url":"https://api.github.com/repos/Seldaek/monolog/subscription","commits_url":"https://api.github.com/repos/Seldaek/monolog/commits{/sha}","git_commits_url":"https://api.github.com/repos/Seldaek/monolog/git/commits{/sha}","comments_url":"https://api.github.com/repos/Seldaek/monolog/comments{/number}","issue_comment_url":"https://api.github.com/repos/Seldaek/monolog/issues/comments/{number}","contents_url":"https://api.github.com/repos/Seldaek/monolog/contents/{+path}","compare_url":"https://api.github.com/repos/Seldaek/monolog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Seldaek/monolog/merges","archive_url":"https://api.github.com/repos/Seldaek/monolog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Seldaek/monolog/downloads","issues_url":"https://api.github.com/repos/Seldaek/monolog/issues{/number}","pulls_url":"https://api.github.com/repos/Seldaek/monolog/pulls{/number}","milestones_url":"https://api.github.com/repos/Seldaek/monolog/milestones{/number}","notifications_url":"https://api.github.com/repos/Seldaek/monolog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Seldaek/monolog/labels{/name}","releases_url":"https://api.github.com/repos/Seldaek/monolog/releases{/id}","created_at":"2011-02-17T02:07:15Z","updated_at":"2014-12-03T03:31:10Z","pushed_at":"2014-11-11T12:05:51Z","git_url":"git://github.com/Seldaek/monolog.git","ssh_url":"git@github.com:Seldaek/monolog.git","clone_url":"https://github.com/Seldaek/monolog.git","svn_url":"https://github.com/Seldaek/monolog","homepage":"","size":4987,"stargazers_count":2784,"watchers_count":2784,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":487,"mirror_url":null,"open_issues_count":39,"forks":487,"open_issues":39,"watchers":2784,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Seldaek/monolog/pulls/463"},"html":{"href":"https://github.com/Seldaek/monolog/pull/463"},"issue":{"href":"https://api.github.com/repos/Seldaek/monolog/issues/463"},"comments":{"href":"https://api.github.com/repos/Seldaek/monolog/issues/463/comments"},"review_comments":{"href":"https://api.github.com/repos/Seldaek/monolog/pulls/463/comments"},"review_comment":{"href":"https://api.github.com/repos/Seldaek/monolog/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Seldaek/monolog/pulls/463/commits"},"statuses":{"href":"https://api.github.com/repos/Seldaek/monolog/statuses/ae68665460a499f7bf56e034911d923b91433693"}}}}