{"action":"created","issue":{"url":"https://api.github.com/repos/anarcher/hubot-simple-logger/issues/7","labels_url":"https://api.github.com/repos/anarcher/hubot-simple-logger/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/anarcher/hubot-simple-logger/issues/7/comments","events_url":"https://api.github.com/repos/anarcher/hubot-simple-logger/issues/7/events","html_url":"https://github.com/anarcher/hubot-simple-logger/pull/7","id":94254615,"number":7,"title":"fix for displaying logs correctly","user":{"login":"impca","id":13270469,"avatar_url":"https://avatars.githubusercontent.com/u/13270469?v=3","gravatar_id":"","url":"https://api.github.com/users/impca","html_url":"https://github.com/impca","followers_url":"https://api.github.com/users/impca/followers","following_url":"https://api.github.com/users/impca/following{/other_user}","gists_url":"https://api.github.com/users/impca/gists{/gist_id}","starred_url":"https://api.github.com/users/impca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/impca/subscriptions","organizations_url":"https://api.github.com/users/impca/orgs","repos_url":"https://api.github.com/users/impca/repos","events_url":"https://api.github.com/users/impca/events{/privacy}","received_events_url":"https://api.github.com/users/impca/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-10T08:56:03Z","updated_at":"2015-09-08T11:12:21Z","closed_at":"2015-09-08T04:38:06Z","pull_request":{"url":"https://api.github.com/repos/anarcher/hubot-simple-logger/pulls/7","html_url":"https://github.com/anarcher/hubot-simple-logger/pull/7","diff_url":"https://github.com/anarcher/hubot-simple-logger/pull/7.diff","patch_url":"https://github.com/anarcher/hubot-simple-logger/pull/7.patch"},"body":"Hi,\r\n\r\nI had to change the code that handles the processing of messages. When hubot logged a message that contained failed output from a shell command {\"killed\":false,\"code\":1,\"signal\":null} , the function escapeHtml started throwing exceptions, because event.message wasn't string, but object. No further messages were processed and webpage with logs for that particular day would not display.\r\n\r\nI have added a failsafe. If escapeHtml fails, the message is silenty discarded and logged. \r\n\r\nAlternatively, it is possible to convert the message to a string and display that string instead. \r\n\r\nYou can decide which one is better (log and discard, or display) and merge it appropriately.\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/anarcher/hubot-simple-logger/issues/comments/138520095","html_url":"https://github.com/anarcher/hubot-simple-logger/pull/7#issuecomment-138520095","issue_url":"https://api.github.com/repos/anarcher/hubot-simple-logger/issues/7","id":138520095,"user":{"login":"impca","id":13270469,"avatar_url":"https://avatars.githubusercontent.com/u/13270469?v=3","gravatar_id":"","url":"https://api.github.com/users/impca","html_url":"https://github.com/impca","followers_url":"https://api.github.com/users/impca/followers","following_url":"https://api.github.com/users/impca/following{/other_user}","gists_url":"https://api.github.com/users/impca/gists{/gist_id}","starred_url":"https://api.github.com/users/impca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/impca/subscriptions","organizations_url":"https://api.github.com/users/impca/orgs","repos_url":"https://api.github.com/users/impca/repos","events_url":"https://api.github.com/users/impca/events{/privacy}","received_events_url":"https://api.github.com/users/impca/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T11:12:21Z","updated_at":"2015-09-08T11:12:21Z","body":"I guess displaying the output is better. If there are no other messages it allows you to see that the command was terminated."}}