{"action":"created","issue":{"url":"https://api.github.com/repos/mcollina/docker-loghose/issues/4","labels_url":"https://api.github.com/repos/mcollina/docker-loghose/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/mcollina/docker-loghose/issues/4/comments","events_url":"https://api.github.com/repos/mcollina/docker-loghose/issues/4/events","html_url":"https://github.com/mcollina/docker-loghose/issues/4","id":119837461,"number":4,"title":"Truncated logs","user":{"login":"megastef","id":7289505,"avatar_url":"https://avatars.githubusercontent.com/u/7289505?v=3","gravatar_id":"","url":"https://api.github.com/users/megastef","html_url":"https://github.com/megastef","followers_url":"https://api.github.com/users/megastef/followers","following_url":"https://api.github.com/users/megastef/following{/other_user}","gists_url":"https://api.github.com/users/megastef/gists{/gist_id}","starred_url":"https://api.github.com/users/megastef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megastef/subscriptions","organizations_url":"https://api.github.com/users/megastef/orgs","repos_url":"https://api.github.com/users/megastef/repos","events_url":"https://api.github.com/users/megastef/events{/privacy}","received_events_url":"https://api.github.com/users/megastef/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-02T00:05:22Z","updated_at":"2015-12-02T12:50:32Z","closed_at":null,"body":"Hi,\r\n\r\nsometimes the first few bytes of a log message are missing\r\n```\r\nO[30926] Registering on the discovery service every 20s...  \r\n```\r\nwhich should be \r\n\r\n```\r\nINFO[30926] Registering on the discovery service every 20s...  \r\n```\r\n\r\nDo you have any idea, how this could happen? \r\nWhen I use 'docker logs', I can see that 'INFO' is colored (ANSI Escape Sequence)"},"comment":{"url":"https://api.github.com/repos/mcollina/docker-loghose/issues/comments/161282038","html_url":"https://github.com/mcollina/docker-loghose/issues/4#issuecomment-161282038","issue_url":"https://api.github.com/repos/mcollina/docker-loghose/issues/4","id":161282038,"user":{"login":"megastef","id":7289505,"avatar_url":"https://avatars.githubusercontent.com/u/7289505?v=3","gravatar_id":"","url":"https://api.github.com/users/megastef","html_url":"https://github.com/megastef","followers_url":"https://api.github.com/users/megastef/followers","following_url":"https://api.github.com/users/megastef/following{/other_user}","gists_url":"https://api.github.com/users/megastef/gists{/gist_id}","starred_url":"https://api.github.com/users/megastef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megastef/subscriptions","organizations_url":"https://api.github.com/users/megastef/orgs","repos_url":"https://api.github.com/users/megastef/repos","events_url":"https://api.github.com/users/megastef/events{/privacy}","received_events_url":"https://api.github.com/users/megastef/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T12:50:31Z","updated_at":"2015-12-02T12:50:31Z","body":"I had to fix this, but I'm not sure if it is a general solution (it might emit empty lines). \r\nHere is what I did to get it working for me (just started with more tests): \r\nhttps://github.com/megastef/docker-loghose/blob/master/lib/parser.js\r\n\r\n- Basically consuming the whole buffer, as I don't know, which header you try to parse\r\n- So I removed most of your parsing stuff. \r\n\r\nI will make a pull request, just to make it easier for you to see the differnces (don't need to be merged). "}}