{"action":"created","comment":{"url":"https://api.github.com/repos/kohana/core/pulls/comments/42472029","id":42472029,"diff_hunk":"@@ -225,4 +240,99 @@ public function write()\n \t\t}\n \t}\n \n+\t/**\n+\t * Logs with an arbitrary level.\n+\t *\n+\t * Adds a message to the log. Replacement values must be passed in to be\n+\t * replaced using Text::interpolate\n+\t *\n+\t *     $log->log(\\Psr\\Log\\LogLevel::INFO, 'You look good, today.');\n+\t *\n+\t *     $log->log(Log::ERROR, 'Could not locate user: {username}', array(\n+\t *         'username' => $username,\n+\t *     ));\n+\t *\n+\t * @uses   Text::interpolate Inserts the replacement values into the message\n+\t * @param  mixed  $level    level of message\n+\t * @param  string $message  message body\n+\t * @param  array  $context  values to replace in the message\n+\t * @return Log\n+\t */\n+\tpublic function log($level, $message, array $context = [])\n+\t{\n+\t\t// check if level is available\n+\t\tif (is_int($level) AND array_key_exists($level, $this->_log_levels))","path":"classes/Kohana/Log.php","position":180,"original_position":180,"commit_id":"cde3ce54166d5aa6bea46649b5847a02356b0c37","original_commit_id":"cde3ce54166d5aa6bea46649b5847a02356b0c37","user":{"login":"enov","id":4045110,"avatar_url":"https://avatars.githubusercontent.com/u/4045110?v=3","gravatar_id":"","url":"https://api.github.com/users/enov","html_url":"https://github.com/enov","followers_url":"https://api.github.com/users/enov/followers","following_url":"https://api.github.com/users/enov/following{/other_user}","gists_url":"https://api.github.com/users/enov/gists{/gist_id}","starred_url":"https://api.github.com/users/enov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enov/subscriptions","organizations_url":"https://api.github.com/users/enov/orgs","repos_url":"https://api.github.com/users/enov/repos","events_url":"https://api.github.com/users/enov/events{/privacy}","received_events_url":"https://api.github.com/users/enov/received_events","type":"User","site_admin":false},"body":":+1: yes, `$this->_log_levels[$level] === NULL` shouldn't happen because of `is_int` test, and `isset will be faster.","created_at":"2015-10-20T09:14:47Z","updated_at":"2015-10-20T09:14:47Z","html_url":"https://github.com/kohana/core/pull/563#discussion_r42472029","pull_request_url":"https://api.github.com/repos/kohana/core/pulls/563","_links":{"self":{"href":"https://api.github.com/repos/kohana/core/pulls/comments/42472029"},"html":{"href":"https://github.com/kohana/core/pull/563#discussion_r42472029"},"pull_request":{"href":"https://api.github.com/repos/kohana/core/pulls/563"}}},"pull_request":{"url":"https://api.github.com/repos/kohana/core/pulls/563","id":23812426,"html_url":"https://github.com/kohana/core/pull/563","diff_url":"https://github.com/kohana/core/pull/563.diff","patch_url":"https://github.com/kohana/core/pull/563.patch","issue_url":"https://api.github.com/repos/kohana/core/issues/563","number":563,"state":"open","locked":false,"title":"[WIP] PSR-3 compliance","user":{"login":"enov","id":4045110,"avatar_url":"https://avatars.githubusercontent.com/u/4045110?v=3","gravatar_id":"","url":"https://api.github.com/users/enov","html_url":"https://github.com/enov","followers_url":"https://api.github.com/users/enov/followers","following_url":"https://api.github.com/users/enov/following{/other_user}","gists_url":"https://api.github.com/users/enov/gists{/gist_id}","starred_url":"https://api.github.com/users/enov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enov/subscriptions","organizations_url":"https://api.github.com/users/enov/orgs","repos_url":"https://api.github.com/users/enov/repos","events_url":"https://api.github.com/users/enov/events{/privacy}","received_events_url":"https://api.github.com/users/enov/received_events","type":"User","site_admin":false},"body":"This is a work-in-progress for PSR-3 compliance.","created_at":"2014-11-04T05:44:17Z","updated_at":"2015-10-20T09:14:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf82a1d08730b0ea9661b25a33343f47903f2ebe","assignee":null,"milestone":{"url":"https://api.github.com/repos/kohana/core/milestones/2","html_url":"https://github.com/kohana/core/milestones/3.4.0","labels_url":"https://api.github.com/repos/kohana/core/milestones/2/labels","id":667070,"number":2,"title":"3.4.0","description":"","creator":{"login":"neo22s","id":241725,"avatar_url":"https://avatars.githubusercontent.com/u/241725?v=3","gravatar_id":"","url":"https://api.github.com/users/neo22s","html_url":"https://github.com/neo22s","followers_url":"https://api.github.com/users/neo22s/followers","following_url":"https://api.github.com/users/neo22s/following{/other_user}","gists_url":"https://api.github.com/users/neo22s/gists{/gist_id}","starred_url":"https://api.github.com/users/neo22s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo22s/subscriptions","organizations_url":"https://api.github.com/users/neo22s/orgs","repos_url":"https://api.github.com/users/neo22s/repos","events_url":"https://api.github.com/users/neo22s/events{/privacy}","received_events_url":"https://api.github.com/users/neo22s/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":2,"state":"open","created_at":"2014-05-22T15:49:54Z","updated_at":"2015-02-02T13:31:45Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/kohana/core/pulls/563/commits","review_comments_url":"https://api.github.com/repos/kohana/core/pulls/563/comments","review_comment_url":"https://api.github.com/repos/kohana/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kohana/core/issues/563/comments","statuses_url":"https://api.github.com/repos/kohana/core/statuses/cde3ce54166d5aa6bea46649b5847a02356b0c37","head":{"label":"kohana:3.4/feature/psr-3-compliance","ref":"3.4/feature/psr-3-compliance","sha":"cde3ce54166d5aa6bea46649b5847a02356b0c37","user":{"login":"kohana","id":39584,"avatar_url":"https://avatars.githubusercontent.com/u/39584?v=3","gravatar_id":"","url":"https://api.github.com/users/kohana","html_url":"https://github.com/kohana","followers_url":"https://api.github.com/users/kohana/followers","following_url":"https://api.github.com/users/kohana/following{/other_user}","gists_url":"https://api.github.com/users/kohana/gists{/gist_id}","starred_url":"https://api.github.com/users/kohana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kohana/subscriptions","organizations_url":"https://api.github.com/users/kohana/orgs","repos_url":"https://api.github.com/users/kohana/repos","events_url":"https://api.github.com/users/kohana/events{/privacy}","received_events_url":"https://api.github.com/users/kohana/received_events","type":"Organization","site_admin":false},"repo":{"id":262633,"name":"core","full_name":"kohana/core","owner":{"login":"kohana","id":39584,"avatar_url":"https://avatars.githubusercontent.com/u/39584?v=3","gravatar_id":"","url":"https://api.github.com/users/kohana","html_url":"https://github.com/kohana","followers_url":"https://api.github.com/users/kohana/followers","following_url":"https://api.github.com/users/kohana/following{/other_user}","gists_url":"https://api.github.com/users/kohana/gists{/gist_id}","starred_url":"https://api.github.com/users/kohana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kohana/subscriptions","organizations_url":"https://api.github.com/users/kohana/orgs","repos_url":"https://api.github.com/users/kohana/repos","events_url":"https://api.github.com/users/kohana/events{/privacy}","received_events_url":"https://api.github.com/users/kohana/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kohana/core","description":"Core system classes from Kohana","fork":false,"url":"https://api.github.com/repos/kohana/core","forks_url":"https://api.github.com/repos/kohana/core/forks","keys_url":"https://api.github.com/repos/kohana/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kohana/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kohana/core/teams","hooks_url":"https://api.github.com/repos/kohana/core/hooks","issue_events_url":"https://api.github.com/repos/kohana/core/issues/events{/number}","events_url":"https://api.github.com/repos/kohana/core/events","assignees_url":"https://api.github.com/repos/kohana/core/assignees{/user}","branches_url":"https://api.github.com/repos/kohana/core/branches{/branch}","tags_url":"https://api.github.com/repos/kohana/core/tags","blobs_url":"https://api.github.com/repos/kohana/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kohana/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kohana/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/kohana/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kohana/core/statuses/{sha}","languages_url":"https://api.github.com/repos/kohana/core/languages","stargazers_url":"https://api.github.com/repos/kohana/core/stargazers","contributors_url":"https://api.github.com/repos/kohana/core/contributors","subscribers_url":"https://api.github.com/repos/kohana/core/subscribers","subscription_url":"https://api.github.com/repos/kohana/core/subscription","commits_url":"https://api.github.com/repos/kohana/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/kohana/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/kohana/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/kohana/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/kohana/core/contents/{+path}","compare_url":"https://api.github.com/repos/kohana/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kohana/core/merges","archive_url":"https://api.github.com/repos/kohana/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kohana/core/downloads","issues_url":"https://api.github.com/repos/kohana/core/issues{/number}","pulls_url":"https://api.github.com/repos/kohana/core/pulls{/number}","milestones_url":"https://api.github.com/repos/kohana/core/milestones{/number}","notifications_url":"https://api.github.com/repos/kohana/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kohana/core/labels{/name}","releases_url":"https://api.github.com/repos/kohana/core/releases{/id}","created_at":"2009-07-30T21:17:45Z","updated_at":"2015-10-20T07:16:42Z","pushed_at":"2015-10-20T08:34:44Z","git_url":"git://github.com/kohana/core.git","ssh_url":"git@github.com:kohana/core.git","clone_url":"https://github.com/kohana/core.git","svn_url":"https://github.com/kohana/core","homepage":"http://kohanaframework.org","size":9949,"stargazers_count":677,"watchers_count":677,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":339,"mirror_url":null,"open_issues_count":38,"forks":339,"open_issues":38,"watchers":677,"default_branch":"3.3/master"}},"base":{"label":"kohana:3.4/develop","ref":"3.4/develop","sha":"21938284f3de2efa6585953c1815b7d39d02b3ad","user":{"login":"kohana","id":39584,"avatar_url":"https://avatars.githubusercontent.com/u/39584?v=3","gravatar_id":"","url":"https://api.github.com/users/kohana","html_url":"https://github.com/kohana","followers_url":"https://api.github.com/users/kohana/followers","following_url":"https://api.github.com/users/kohana/following{/other_user}","gists_url":"https://api.github.com/users/kohana/gists{/gist_id}","starred_url":"https://api.github.com/users/kohana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kohana/subscriptions","organizations_url":"https://api.github.com/users/kohana/orgs","repos_url":"https://api.github.com/users/kohana/repos","events_url":"https://api.github.com/users/kohana/events{/privacy}","received_events_url":"https://api.github.com/users/kohana/received_events","type":"Organization","site_admin":false},"repo":{"id":262633,"name":"core","full_name":"kohana/core","owner":{"login":"kohana","id":39584,"avatar_url":"https://avatars.githubusercontent.com/u/39584?v=3","gravatar_id":"","url":"https://api.github.com/users/kohana","html_url":"https://github.com/kohana","followers_url":"https://api.github.com/users/kohana/followers","following_url":"https://api.github.com/users/kohana/following{/other_user}","gists_url":"https://api.github.com/users/kohana/gists{/gist_id}","starred_url":"https://api.github.com/users/kohana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kohana/subscriptions","organizations_url":"https://api.github.com/users/kohana/orgs","repos_url":"https://api.github.com/users/kohana/repos","events_url":"https://api.github.com/users/kohana/events{/privacy}","received_events_url":"https://api.github.com/users/kohana/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kohana/core","description":"Core system classes from Kohana","fork":false,"url":"https://api.github.com/repos/kohana/core","forks_url":"https://api.github.com/repos/kohana/core/forks","keys_url":"https://api.github.com/repos/kohana/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kohana/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kohana/core/teams","hooks_url":"https://api.github.com/repos/kohana/core/hooks","issue_events_url":"https://api.github.com/repos/kohana/core/issues/events{/number}","events_url":"https://api.github.com/repos/kohana/core/events","assignees_url":"https://api.github.com/repos/kohana/core/assignees{/user}","branches_url":"https://api.github.com/repos/kohana/core/branches{/branch}","tags_url":"https://api.github.com/repos/kohana/core/tags","blobs_url":"https://api.github.com/repos/kohana/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kohana/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kohana/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/kohana/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kohana/core/statuses/{sha}","languages_url":"https://api.github.com/repos/kohana/core/languages","stargazers_url":"https://api.github.com/repos/kohana/core/stargazers","contributors_url":"https://api.github.com/repos/kohana/core/contributors","subscribers_url":"https://api.github.com/repos/kohana/core/subscribers","subscription_url":"https://api.github.com/repos/kohana/core/subscription","commits_url":"https://api.github.com/repos/kohana/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/kohana/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/kohana/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/kohana/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/kohana/core/contents/{+path}","compare_url":"https://api.github.com/repos/kohana/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kohana/core/merges","archive_url":"https://api.github.com/repos/kohana/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kohana/core/downloads","issues_url":"https://api.github.com/repos/kohana/core/issues{/number}","pulls_url":"https://api.github.com/repos/kohana/core/pulls{/number}","milestones_url":"https://api.github.com/repos/kohana/core/milestones{/number}","notifications_url":"https://api.github.com/repos/kohana/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kohana/core/labels{/name}","releases_url":"https://api.github.com/repos/kohana/core/releases{/id}","created_at":"2009-07-30T21:17:45Z","updated_at":"2015-10-20T07:16:42Z","pushed_at":"2015-10-20T08:34:44Z","git_url":"git://github.com/kohana/core.git","ssh_url":"git@github.com:kohana/core.git","clone_url":"https://github.com/kohana/core.git","svn_url":"https://github.com/kohana/core","homepage":"http://kohanaframework.org","size":9949,"stargazers_count":677,"watchers_count":677,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":339,"mirror_url":null,"open_issues_count":38,"forks":339,"open_issues":38,"watchers":677,"default_branch":"3.3/master"}},"_links":{"self":{"href":"https://api.github.com/repos/kohana/core/pulls/563"},"html":{"href":"https://github.com/kohana/core/pull/563"},"issue":{"href":"https://api.github.com/repos/kohana/core/issues/563"},"comments":{"href":"https://api.github.com/repos/kohana/core/issues/563/comments"},"review_comments":{"href":"https://api.github.com/repos/kohana/core/pulls/563/comments"},"review_comment":{"href":"https://api.github.com/repos/kohana/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kohana/core/pulls/563/commits"},"statuses":{"href":"https://api.github.com/repos/kohana/core/statuses/cde3ce54166d5aa6bea46649b5847a02356b0c37"}}}}