{"action":"closed","issue":{"url":"https://api.github.com/repos/cloudfoundry/loggregator/issues/86","labels_url":"https://api.github.com/repos/cloudfoundry/loggregator/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry/loggregator/issues/86/comments","events_url":"https://api.github.com/repos/cloudfoundry/loggregator/issues/86/events","html_url":"https://github.com/cloudfoundry/loggregator/issues/86","id":109524987,"number":86,"title":"Applications exiting within 10-20ms of startup lose logs","user":{"login":"Jonty","id":1553,"avatar_url":"https://avatars.githubusercontent.com/u/1553?v=3","gravatar_id":"","url":"https://api.github.com/users/Jonty","html_url":"https://github.com/Jonty","followers_url":"https://api.github.com/users/Jonty/followers","following_url":"https://api.github.com/users/Jonty/following{/other_user}","gists_url":"https://api.github.com/users/Jonty/gists{/gist_id}","starred_url":"https://api.github.com/users/Jonty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jonty/subscriptions","organizations_url":"https://api.github.com/users/Jonty/orgs","repos_url":"https://api.github.com/users/Jonty/repos","events_url":"https://api.github.com/users/Jonty/events{/privacy}","received_events_url":"https://api.github.com/users/Jonty/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-02T16:22:08Z","updated_at":"2015-10-02T21:27:16Z","closed_at":"2015-10-02T21:27:16Z","body":"If an application starts and immediately crashes/quits, anything outputted to stdout/err is not logged which makes debugging quite hard. On our deployments it seems to affect anything that dies within 10-20ms.\r\n\r\nThe workaround for this is to change the Procfile to have a sleep statement in it, e.g. ````web: sleep 1 && command````.\r\n\r\nI'm not sure if this is the correct place to file this issue, but I figured it was a good start.\r\n\r\nThis can be replicated by uploading a simple application that outputs something to stdout and immediately quits, such as ````example.go````:\r\n\r\n````\r\nfunc main() {\r\n    println(\"This will not appear in the application logs\")\r\n}\r\n````"}}