{"action":"created","issue":{"url":"https://api.github.com/repos/Kitware/HPCCloud/issues/32","labels_url":"https://api.github.com/repos/Kitware/HPCCloud/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/Kitware/HPCCloud/issues/32/comments","events_url":"https://api.github.com/repos/Kitware/HPCCloud/issues/32/events","html_url":"https://github.com/Kitware/HPCCloud/issues/32","id":108125241,"number":32,"title":"Add logging information to simulation","user":{"login":"cjh1","id":1031053,"avatar_url":"https://avatars.githubusercontent.com/u/1031053?v=3","gravatar_id":"","url":"https://api.github.com/users/cjh1","html_url":"https://github.com/cjh1","followers_url":"https://api.github.com/users/cjh1/followers","following_url":"https://api.github.com/users/cjh1/following{/other_user}","gists_url":"https://api.github.com/users/cjh1/gists{/gist_id}","starred_url":"https://api.github.com/users/cjh1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjh1/subscriptions","organizations_url":"https://api.github.com/users/cjh1/orgs","repos_url":"https://api.github.com/users/cjh1/repos","events_url":"https://api.github.com/users/cjh1/events{/privacy}","received_events_url":"https://api.github.com/users/cjh1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-24T13:02:08Z","updated_at":"2015-09-29T22:00:53Z","closed_at":null,"body":"The task resource has a log property that we should expose to the user. The property is of the following form:\r\n\r\n```javascript\r\n  \"log\": [\r\n    {\r\n      \"$ref\": \"http://ulex:9001/api/v1/jobs/56030771f657105ab7913b18/log\", ...\r\n    }\r\n```\r\n\r\nThis is basically an aggregate log of all the resource create by the task for example the cluster and jobs that are submitted to it. So the pseudo code for tail the task log would be as follows:\r\n\r\nwhile task is running:\r\n  fetch task:\r\n    for each log in task['log']:\r\n      fetch log provide offset of lines already fetched:\r\n        add lines to log in ui\r\n\r\nThe log entries from the resources are of the following form:\r\n\r\n```javascript\r\n{\r\n      \"args\": [],\r\n      \"created\": 1442957579.78141,\r\n      \"exc_info\": null,\r\n      \"exc_text\": null,\r\n      \"filename\": \"job.py\",\r\n      \"funcName\": \"_tail_output\",\r\n      \"levelname\": \"INFO\",\r\n      \"levelno\": 20,\r\n      \"lineno\": 288,\r\n      \"module\": \"job\",\r\n      \"msecs\": 781.4099788665771,\r\n      \"msg\": \"Skipping tail of 5601c8e4f657105a8f7ce936/output/stat.txt as file doesn't currently exist\",\r\n      \"name\": \"starcluster\",\r\n      \"pathname\": \"/home/cjh/work/source/cumulus/cumulus/starcluster/tasks/job.py\",\r\n      \"process\": 22983,\r\n      \"processName\": \"Worker-2\",\r\n      \"relativeCreated\": 1952257.1358680725,\r\n      \"thread\": 139862483904320,\r\n      \"threadName\": \"MainThread\"\r\n}\r\n```\r\n\r\nFor now I think we what to present the following information:\r\n\r\n<created> <levelname> <msg>\r\n\r\nWith created converted to a human readable format.  I might be nice to allow a user to double click on an entry which would reveal all the log information.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Kitware/HPCCloud/issues/comments/144203998","html_url":"https://github.com/Kitware/HPCCloud/issues/32#issuecomment-144203998","issue_url":"https://api.github.com/repos/Kitware/HPCCloud/issues/32","id":144203998,"user":{"login":"TristanWright","id":13318121,"avatar_url":"https://avatars.githubusercontent.com/u/13318121?v=3","gravatar_id":"","url":"https://api.github.com/users/TristanWright","html_url":"https://github.com/TristanWright","followers_url":"https://api.github.com/users/TristanWright/followers","following_url":"https://api.github.com/users/TristanWright/following{/other_user}","gists_url":"https://api.github.com/users/TristanWright/gists{/gist_id}","starred_url":"https://api.github.com/users/TristanWright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TristanWright/subscriptions","organizations_url":"https://api.github.com/users/TristanWright/orgs","repos_url":"https://api.github.com/users/TristanWright/repos","events_url":"https://api.github.com/users/TristanWright/events{/privacy}","received_events_url":"https://api.github.com/users/TristanWright/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T22:00:53Z","updated_at":"2015-09-29T22:00:53Z","body":"Getting a 405 here\r\n```\r\nXMLHttpRequest cannot load http://localhost:8080/api/v1/cluster/560b0660d80e0bcb1979455e/log. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8888' is therefore not allowed access. The response had HTTP status code 405.\r\n```"}}