{"action":"created","comment":{"url":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments/176823969","pull_request_review_id":106600824,"id":176823969,"diff_hunk":"@@ -236,7 +236,13 @@ defmodule Logger.Backends.Console do\n   defp retry_log(error, %{device: device, ref: ref, output: dirty} = state) do\n     Process.demonitor(ref, [:flush])\n \n-    case :unicode.characters_to_binary(dirty) do\n+    try do\n+      :unicode.characters_to_binary(dirty)\n+    rescue\n+      ArgumentError ->\n+        clean = [\"failure while trying to output malformed data: \", inspect(dirty), ?\\n]\n+        %{state | ref: async_io(device, clean), output: clean}","path":"lib/logger/lib/logger/backends/console.ex","position":null,"original_position":10,"commit_id":"ff0d4b2250b3f376f8aa616d5030dab8c42b3688","original_commit_id":"a11a8ffee9d95fd3505ed52c30ffa6d26f6f3e49","user":{"login":"whatyouhide","id":3890250,"avatar_url":"https://avatars3.githubusercontent.com/u/3890250?v=4","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false},"body":"@josevalim but then it would be broadcast to all backends, while there is a problem only with the console backend. Is it fine to log this to all backends?","created_at":"2018-03-23T18:18:10Z","updated_at":"2018-03-23T18:18:10Z","html_url":"https://github.com/elixir-lang/elixir/pull/7478#discussion_r176823969","pull_request_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/7478","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments/176823969"},"html":{"href":"https://github.com/elixir-lang/elixir/pull/7478#discussion_r176823969"},"pull_request":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/7478"}},"in_reply_to_id":176605120},"pull_request":{"url":"https://api.github.com/repos/elixir-lang/elixir/pulls/7478","id":176938841,"html_url":"https://github.com/elixir-lang/elixir/pull/7478","diff_url":"https://github.com/elixir-lang/elixir/pull/7478.diff","patch_url":"https://github.com/elixir-lang/elixir/pull/7478.patch","issue_url":"https://api.github.com/repos/elixir-lang/elixir/issues/7478","number":7478,"state":"open","locked":false,"title":"Handle bad chardata lookalikes in Logger","user":{"login":"whatyouhide","id":3890250,"avatar_url":"https://avatars3.githubusercontent.com/u/3890250?v=4","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false},"body":"Related to #7474.","created_at":"2018-03-22T23:42:32Z","updated_at":"2018-03-23T18:18:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2d201ee0e19cc5a478d97fe63aa7f9c2e60351f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/7478/commits","review_comments_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/7478/comments","review_comment_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/issues/7478/comments","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/ff0d4b2250b3f376f8aa616d5030dab8c42b3688","head":{"label":"elixir-lang:al/logger-bad-data","ref":"al/logger-bad-data","sha":"ff0d4b2250b3f376f8aa616d5030dab8c42b3688","user":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars1.githubusercontent.com/u/1481354?v=4","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":1234714,"name":"elixir","full_name":"elixir-lang/elixir","owner":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars1.githubusercontent.com/u/1481354?v=4","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixir-lang/elixir","description":"Elixir is a dynamic, functional language designed for building scalable and maintainable applications","fork":false,"url":"https://api.github.com/repos/elixir-lang/elixir","forks_url":"https://api.github.com/repos/elixir-lang/elixir/forks","keys_url":"https://api.github.com/repos/elixir-lang/elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixir-lang/elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixir-lang/elixir/teams","hooks_url":"https://api.github.com/repos/elixir-lang/elixir/hooks","issue_events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/events{/number}","events_url":"https://api.github.com/repos/elixir-lang/elixir/events","assignees_url":"https://api.github.com/repos/elixir-lang/elixir/assignees{/user}","branches_url":"https://api.github.com/repos/elixir-lang/elixir/branches{/branch}","tags_url":"https://api.github.com/repos/elixir-lang/elixir/tags","blobs_url":"https://api.github.com/repos/elixir-lang/elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixir-lang/elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixir-lang/elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixir-lang/elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/elixir-lang/elixir/languages","stargazers_url":"https://api.github.com/repos/elixir-lang/elixir/stargazers","contributors_url":"https://api.github.com/repos/elixir-lang/elixir/contributors","subscribers_url":"https://api.github.com/repos/elixir-lang/elixir/subscribers","subscription_url":"https://api.github.com/repos/elixir-lang/elixir/subscription","commits_url":"https://api.github.com/repos/elixir-lang/elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixir-lang/elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixir-lang/elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixir-lang/elixir/contents/{+path}","compare_url":"https://api.github.com/repos/elixir-lang/elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixir-lang/elixir/merges","archive_url":"https://api.github.com/repos/elixir-lang/elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixir-lang/elixir/downloads","issues_url":"https://api.github.com/repos/elixir-lang/elixir/issues{/number}","pulls_url":"https://api.github.com/repos/elixir-lang/elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/elixir-lang/elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/elixir-lang/elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixir-lang/elixir/labels{/name}","releases_url":"https://api.github.com/repos/elixir-lang/elixir/releases{/id}","deployments_url":"https://api.github.com/repos/elixir-lang/elixir/deployments","created_at":"2011-01-09T08:43:57Z","updated_at":"2018-03-23T15:54:01Z","pushed_at":"2018-03-23T18:17:18Z","git_url":"git://github.com/elixir-lang/elixir.git","ssh_url":"git@github.com:elixir-lang/elixir.git","clone_url":"https://github.com/elixir-lang/elixir.git","svn_url":"https://github.com/elixir-lang/elixir","homepage":"http://elixir-lang.org/","size":35917,"stargazers_count":12574,"watchers_count":12574,"language":"Elixir","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1832,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1832,"open_issues":34,"watchers":12574,"default_branch":"master"}},"base":{"label":"elixir-lang:master","ref":"master","sha":"5947ed751eb0276cb7fda666c319dba451a5e9e7","user":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars1.githubusercontent.com/u/1481354?v=4","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":1234714,"name":"elixir","full_name":"elixir-lang/elixir","owner":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars1.githubusercontent.com/u/1481354?v=4","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixir-lang/elixir","description":"Elixir is a dynamic, functional language designed for building scalable and maintainable applications","fork":false,"url":"https://api.github.com/repos/elixir-lang/elixir","forks_url":"https://api.github.com/repos/elixir-lang/elixir/forks","keys_url":"https://api.github.com/repos/elixir-lang/elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixir-lang/elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixir-lang/elixir/teams","hooks_url":"https://api.github.com/repos/elixir-lang/elixir/hooks","issue_events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/events{/number}","events_url":"https://api.github.com/repos/elixir-lang/elixir/events","assignees_url":"https://api.github.com/repos/elixir-lang/elixir/assignees{/user}","branches_url":"https://api.github.com/repos/elixir-lang/elixir/branches{/branch}","tags_url":"https://api.github.com/repos/elixir-lang/elixir/tags","blobs_url":"https://api.github.com/repos/elixir-lang/elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixir-lang/elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixir-lang/elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixir-lang/elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/elixir-lang/elixir/languages","stargazers_url":"https://api.github.com/repos/elixir-lang/elixir/stargazers","contributors_url":"https://api.github.com/repos/elixir-lang/elixir/contributors","subscribers_url":"https://api.github.com/repos/elixir-lang/elixir/subscribers","subscription_url":"https://api.github.com/repos/elixir-lang/elixir/subscription","commits_url":"https://api.github.com/repos/elixir-lang/elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixir-lang/elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixir-lang/elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixir-lang/elixir/contents/{+path}","compare_url":"https://api.github.com/repos/elixir-lang/elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixir-lang/elixir/merges","archive_url":"https://api.github.com/repos/elixir-lang/elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixir-lang/elixir/downloads","issues_url":"https://api.github.com/repos/elixir-lang/elixir/issues{/number}","pulls_url":"https://api.github.com/repos/elixir-lang/elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/elixir-lang/elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/elixir-lang/elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixir-lang/elixir/labels{/name}","releases_url":"https://api.github.com/repos/elixir-lang/elixir/releases{/id}","deployments_url":"https://api.github.com/repos/elixir-lang/elixir/deployments","created_at":"2011-01-09T08:43:57Z","updated_at":"2018-03-23T15:54:01Z","pushed_at":"2018-03-23T18:17:18Z","git_url":"git://github.com/elixir-lang/elixir.git","ssh_url":"git@github.com:elixir-lang/elixir.git","clone_url":"https://github.com/elixir-lang/elixir.git","svn_url":"https://github.com/elixir-lang/elixir","homepage":"http://elixir-lang.org/","size":35917,"stargazers_count":12574,"watchers_count":12574,"language":"Elixir","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1832,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1832,"open_issues":34,"watchers":12574,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/7478"},"html":{"href":"https://github.com/elixir-lang/elixir/pull/7478"},"issue":{"href":"https://api.github.com/repos/elixir-lang/elixir/issues/7478"},"comments":{"href":"https://api.github.com/repos/elixir-lang/elixir/issues/7478/comments"},"review_comments":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/7478/comments"},"review_comment":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/7478/commits"},"statuses":{"href":"https://api.github.com/repos/elixir-lang/elixir/statuses/ff0d4b2250b3f376f8aa616d5030dab8c42b3688"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"whatyouhide"}}