{"action":"created","comment":{"url":"https://api.github.com/repos/Seldaek/monolog/pulls/comments/33822450","id":33822450,"diff_hunk":"@@ -99,6 +110,25 @@ protected function write(array $record)\n \n     private function customErrorHandler($code, $msg)\n     {\n-        $this->errorMessage = preg_replace('{^fopen\\(.*?\\): }', '', $msg);\n+        $this->errorMessage = preg_replace('{^(fopen|mkdir)\\(.*?\\): }', '', $msg);\n+    }\n+\n+    /**\n+     * @param string $stream\n+     *\n+     * @return null|string\n+     */\n+    private function getDirFromStream($stream)\n+    {\n+        $pos = strpos($stream, '://');\n+        if ($pos === false) {\n+            return dirname($stream);\n+        }\n+\n+        if ('file:///' === substr($stream, 0, 8)) {\n+            return DIRECTORY_SEPARATOR.dirname(substr($stream, 8));","path":"src/Monolog/Handler/StreamHandler.php","position":46,"original_position":46,"commit_id":"72f131b23283905ad65af84b2949a7df2fa16109","original_commit_id":"72f131b23283905ad65af84b2949a7df2fa16109","user":{"login":"dominikzogg","id":1011217,"avatar_url":"https://avatars.githubusercontent.com/u/1011217?v=3","gravatar_id":"","url":"https://api.github.com/users/dominikzogg","html_url":"https://github.com/dominikzogg","followers_url":"https://api.github.com/users/dominikzogg/followers","following_url":"https://api.github.com/users/dominikzogg/following{/other_user}","gists_url":"https://api.github.com/users/dominikzogg/gists{/gist_id}","starred_url":"https://api.github.com/users/dominikzogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominikzogg/subscriptions","organizations_url":"https://api.github.com/users/dominikzogg/orgs","repos_url":"https://api.github.com/users/dominikzogg/repos","events_url":"https://api.github.com/users/dominikzogg/events{/privacy}","received_events_url":"https://api.github.com/users/dominikzogg/received_events","type":"User","site_admin":false},"body":"@Seldaek is there really a filemapper file://, cause in my tests i only get file:/// running?","created_at":"2015-07-02T21:00:49Z","updated_at":"2015-07-02T21:00:49Z","html_url":"https://github.com/Seldaek/monolog/pull/584#discussion_r33822450","pull_request_url":"https://api.github.com/repos/Seldaek/monolog/pulls/584","_links":{"self":{"href":"https://api.github.com/repos/Seldaek/monolog/pulls/comments/33822450"},"html":{"href":"https://github.com/Seldaek/monolog/pull/584#discussion_r33822450"},"pull_request":{"href":"https://api.github.com/repos/Seldaek/monolog/pulls/584"}}},"pull_request":{"url":"https://api.github.com/repos/Seldaek/monolog/pulls/584","id":38182664,"html_url":"https://github.com/Seldaek/monolog/pull/584","diff_url":"https://github.com/Seldaek/monolog/pull/584.diff","patch_url":"https://github.com/Seldaek/monolog/pull/584.patch","issue_url":"https://api.github.com/repos/Seldaek/monolog/issues/584","number":584,"state":"open","locked":false,"title":"stream handler creates a directory if its possible","user":{"login":"dominikzogg","id":1011217,"avatar_url":"https://avatars.githubusercontent.com/u/1011217?v=3","gravatar_id":"","url":"https://api.github.com/users/dominikzogg","html_url":"https://github.com/dominikzogg","followers_url":"https://api.github.com/users/dominikzogg/followers","following_url":"https://api.github.com/users/dominikzogg/following{/other_user}","gists_url":"https://api.github.com/users/dominikzogg/gists{/gist_id}","starred_url":"https://api.github.com/users/dominikzogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominikzogg/subscriptions","organizations_url":"https://api.github.com/users/dominikzogg/orgs","repos_url":"https://api.github.com/users/dominikzogg/repos","events_url":"https://api.github.com/users/dominikzogg/events{/privacy}","received_events_url":"https://api.github.com/users/dominikzogg/received_events","type":"User","site_admin":false},"body":"referers to #581 ","created_at":"2015-06-21T11:06:33Z","updated_at":"2015-07-02T21:00:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a30b3b56708920726c1d76d60fef0af6c961edcf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Seldaek/monolog/pulls/584/commits","review_comments_url":"https://api.github.com/repos/Seldaek/monolog/pulls/584/comments","review_comment_url":"https://api.github.com/repos/Seldaek/monolog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Seldaek/monolog/issues/584/comments","statuses_url":"https://api.github.com/repos/Seldaek/monolog/statuses/72f131b23283905ad65af84b2949a7df2fa16109","head":{"label":"dominikzogg:fixmissingdirectory","ref":"fixmissingdirectory","sha":"72f131b23283905ad65af84b2949a7df2fa16109","user":{"login":"dominikzogg","id":1011217,"avatar_url":"https://avatars.githubusercontent.com/u/1011217?v=3","gravatar_id":"","url":"https://api.github.com/users/dominikzogg","html_url":"https://github.com/dominikzogg","followers_url":"https://api.github.com/users/dominikzogg/followers","following_url":"https://api.github.com/users/dominikzogg/following{/other_user}","gists_url":"https://api.github.com/users/dominikzogg/gists{/gist_id}","starred_url":"https://api.github.com/users/dominikzogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominikzogg/subscriptions","organizations_url":"https://api.github.com/users/dominikzogg/orgs","repos_url":"https://api.github.com/users/dominikzogg/repos","events_url":"https://api.github.com/users/dominikzogg/events{/privacy}","received_events_url":"https://api.github.com/users/dominikzogg/received_events","type":"User","site_admin":false},"repo":{"id":37803489,"name":"monolog","full_name":"dominikzogg/monolog","owner":{"login":"dominikzogg","id":1011217,"avatar_url":"https://avatars.githubusercontent.com/u/1011217?v=3","gravatar_id":"","url":"https://api.github.com/users/dominikzogg","html_url":"https://github.com/dominikzogg","followers_url":"https://api.github.com/users/dominikzogg/followers","following_url":"https://api.github.com/users/dominikzogg/following{/other_user}","gists_url":"https://api.github.com/users/dominikzogg/gists{/gist_id}","starred_url":"https://api.github.com/users/dominikzogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominikzogg/subscriptions","organizations_url":"https://api.github.com/users/dominikzogg/orgs","repos_url":"https://api.github.com/users/dominikzogg/repos","events_url":"https://api.github.com/users/dominikzogg/events{/privacy}","received_events_url":"https://api.github.com/users/dominikzogg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dominikzogg/monolog","description":"Sends your logs to files, sockets, inboxes, databases and various web services","fork":true,"url":"https://api.github.com/repos/dominikzogg/monolog","forks_url":"https://api.github.com/repos/dominikzogg/monolog/forks","keys_url":"https://api.github.com/repos/dominikzogg/monolog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dominikzogg/monolog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dominikzogg/monolog/teams","hooks_url":"https://api.github.com/repos/dominikzogg/monolog/hooks","issue_events_url":"https://api.github.com/repos/dominikzogg/monolog/issues/events{/number}","events_url":"https://api.github.com/repos/dominikzogg/monolog/events","assignees_url":"https://api.github.com/repos/dominikzogg/monolog/assignees{/user}","branches_url":"https://api.github.com/repos/dominikzogg/monolog/branches{/branch}","tags_url":"https://api.github.com/repos/dominikzogg/monolog/tags","blobs_url":"https://api.github.com/repos/dominikzogg/monolog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dominikzogg/monolog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dominikzogg/monolog/git/refs{/sha}","trees_url":"https://api.github.com/repos/dominikzogg/monolog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dominikzogg/monolog/statuses/{sha}","languages_url":"https://api.github.com/repos/dominikzogg/monolog/languages","stargazers_url":"https://api.github.com/repos/dominikzogg/monolog/stargazers","contributors_url":"https://api.github.com/repos/dominikzogg/monolog/contributors","subscribers_url":"https://api.github.com/repos/dominikzogg/monolog/subscribers","subscription_url":"https://api.github.com/repos/dominikzogg/monolog/subscription","commits_url":"https://api.github.com/repos/dominikzogg/monolog/commits{/sha}","git_commits_url":"https://api.github.com/repos/dominikzogg/monolog/git/commits{/sha}","comments_url":"https://api.github.com/repos/dominikzogg/monolog/comments{/number}","issue_comment_url":"https://api.github.com/repos/dominikzogg/monolog/issues/comments{/number}","contents_url":"https://api.github.com/repos/dominikzogg/monolog/contents/{+path}","compare_url":"https://api.github.com/repos/dominikzogg/monolog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dominikzogg/monolog/merges","archive_url":"https://api.github.com/repos/dominikzogg/monolog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dominikzogg/monolog/downloads","issues_url":"https://api.github.com/repos/dominikzogg/monolog/issues{/number}","pulls_url":"https://api.github.com/repos/dominikzogg/monolog/pulls{/number}","milestones_url":"https://api.github.com/repos/dominikzogg/monolog/milestones{/number}","notifications_url":"https://api.github.com/repos/dominikzogg/monolog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dominikzogg/monolog/labels{/name}","releases_url":"https://api.github.com/repos/dominikzogg/monolog/releases{/id}","created_at":"2015-06-21T09:25:06Z","updated_at":"2015-06-21T09:25:08Z","pushed_at":"2015-06-22T20:13:55Z","git_url":"git://github.com/dominikzogg/monolog.git","ssh_url":"git@github.com:dominikzogg/monolog.git","clone_url":"https://github.com/dominikzogg/monolog.git","svn_url":"https://github.com/dominikzogg/monolog","homepage":"","size":1575,"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":"cc145b85fe1d1093f0bfa2d1dffb341904a1762b","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":"2015-07-02T18:19:44Z","pushed_at":"2015-06-30T22:26:19Z","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":22982,"stargazers_count":3563,"watchers_count":3563,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":646,"mirror_url":null,"open_issues_count":42,"forks":646,"open_issues":42,"watchers":3563,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Seldaek/monolog/pulls/584"},"html":{"href":"https://github.com/Seldaek/monolog/pull/584"},"issue":{"href":"https://api.github.com/repos/Seldaek/monolog/issues/584"},"comments":{"href":"https://api.github.com/repos/Seldaek/monolog/issues/584/comments"},"review_comments":{"href":"https://api.github.com/repos/Seldaek/monolog/pulls/584/comments"},"review_comment":{"href":"https://api.github.com/repos/Seldaek/monolog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Seldaek/monolog/pulls/584/commits"},"statuses":{"href":"https://api.github.com/repos/Seldaek/monolog/statuses/72f131b23283905ad65af84b2949a7df2fa16109"}}}}