{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/22982","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/22982/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/22982/comments","events_url":"https://api.github.com/repos/docker/docker/issues/22982/events","html_url":"https://github.com/docker/docker/pull/22982","id":156789233,"number":22982,"title":"Improve logging of long log lines","user":{"login":"nalind","id":1200159,"avatar_url":"https://avatars.githubusercontent.com/u/1200159?v=3","gravatar_id":"","url":"https://api.github.com/users/nalind","html_url":"https://github.com/nalind","followers_url":"https://api.github.com/users/nalind/followers","following_url":"https://api.github.com/users/nalind/following{/other_user}","gists_url":"https://api.github.com/users/nalind/gists{/gist_id}","starred_url":"https://api.github.com/users/nalind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nalind/subscriptions","organizations_url":"https://api.github.com/users/nalind/orgs","repos_url":"https://api.github.com/users/nalind/repos","events_url":"https://api.github.com/users/nalind/events{/privacy}","received_events_url":"https://api.github.com/users/nalind/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/status/2-code-review","name":"status/2-code-review","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-25T16:05:26Z","updated_at":"2016-06-22T15:00:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/22982","html_url":"https://github.com/docker/docker/pull/22982","diff_url":"https://github.com/docker/docker/pull/22982.diff","patch_url":"https://github.com/docker/docker/pull/22982.patch"},"body":"**- What I did**\r\nWorked up a proposal for addressing the memory usage in https://github.com/docker/docker/issues/18057.\r\n\r\n**- How I did it**\r\nSwitch from using a reader from the bufio package to doing the buffering ourselves, and tracking whether or not we read the end of a line.  That information is now passed to log drivers so that they can do the right thing when they're sending entries to clients that call a container's _logs_ handler.\r\n\r\n**- How to verify it**\r\nRun `docker run -d busybox /bin/sh -c 'while true ; do echo -n  \"aaasd\"; done'` and observe usage either with `top` using memory sorting, or with DEBUG set, `dockerd` listening on a TCP port,  and `watch go tool pprof --text /usr/bin/docker-current http://$hostname:$port/debug/pprof/heap`\r\n\r\n**- Description for the changelog**\r\nImprove logging of long log lines"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/227771931","html_url":"https://github.com/docker/docker/pull/22982#issuecomment-227771931","issue_url":"https://api.github.com/repos/docker/docker/issues/22982","id":227771931,"user":{"login":"runcom","id":849915,"avatar_url":"https://avatars.githubusercontent.com/u/849915?v=3","gravatar_id":"","url":"https://api.github.com/users/runcom","html_url":"https://github.com/runcom","followers_url":"https://api.github.com/users/runcom/followers","following_url":"https://api.github.com/users/runcom/following{/other_user}","gists_url":"https://api.github.com/users/runcom/gists{/gist_id}","starred_url":"https://api.github.com/users/runcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runcom/subscriptions","organizations_url":"https://api.github.com/users/runcom/orgs","repos_url":"https://api.github.com/users/runcom/repos","events_url":"https://api.github.com/users/runcom/events{/privacy}","received_events_url":"https://api.github.com/users/runcom/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T15:00:19Z","updated_at":"2016-06-22T15:00:19Z","body":"LGTM ping @LK4D4 @cpuguy83  @unclejack "}}
{"actor":{"display_login":"runcom"}}