{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/osquery/issues/2823","repository_url":"https://api.github.com/repos/facebook/osquery","labels_url":"https://api.github.com/repos/facebook/osquery/issues/2823/labels{/name}","comments_url":"https://api.github.com/repos/facebook/osquery/issues/2823/comments","events_url":"https://api.github.com/repos/facebook/osquery/issues/2823/events","html_url":"https://github.com/facebook/osquery/pull/2823","id":193044441,"number":2823,"title":"[Fix #2744] Increase amount of logged messages","user":{"login":"vjon","id":4079953,"avatar_url":"https://avatars.githubusercontent.com/u/4079953?v=3","gravatar_id":"","url":"https://api.github.com/users/vjon","html_url":"https://github.com/vjon","followers_url":"https://api.github.com/users/vjon/followers","following_url":"https://api.github.com/users/vjon/following{/other_user}","gists_url":"https://api.github.com/users/vjon/gists{/gist_id}","starred_url":"https://api.github.com/users/vjon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjon/subscriptions","organizations_url":"https://api.github.com/users/vjon/orgs","repos_url":"https://api.github.com/users/vjon/repos","events_url":"https://api.github.com/users/vjon/events{/privacy}","received_events_url":"https://api.github.com/users/vjon/received_events","type":"User","site_admin":false},"labels":[{"id":196858822,"url":"https://api.github.com/repos/facebook/osquery/labels/CLA%20Signed","name":"CLA Signed","color":"009900","default":false},{"id":363501440,"url":"https://api.github.com/repos/facebook/osquery/labels/logging","name":"logging","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-12-02T06:32:39Z","updated_at":"2016-12-08T04:44:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/osquery/pulls/2823","html_url":"https://github.com/facebook/osquery/pull/2823","diff_url":"https://github.com/facebook/osquery/pull/2823.diff","patch_url":"https://github.com/facebook/osquery/pull/2823.patch"},"body":"Here's my attempt at increasing the amount of logging throughout the code base. Notes on convention:\r\n\r\n- Messages are logged immediately after the thrown error, with the error itself (i.e. \"e.what()\") included with the return Status as applicable\r\n- In cases where the error causes program termination, LOG(ERROR) is used (this one's obvious)\r\n- In cases where the error causes the function to return early, LOG(WARNING) is used\r\n- In cases where the error doesn't cause the function to return early, but alters its behavior noticeably, VLOG(1) is used\r\n- In cases similar to the above, but where the condition could happen multiple times in quick succession (e.g. try/catch nested inside a loop), VLOG(2) is used\r\n\r\nNotably absent from the above scheme is the use of LOG(FATAL), LOG(INFO), and higher levels of VLOG(...)\r\n\r\nIf there are any recommendations for better use of the various google-glog macros, I'd be happy to discuss them :)"},"comment":{"url":"https://api.github.com/repos/facebook/osquery/issues/comments/265651832","html_url":"https://github.com/facebook/osquery/pull/2823#issuecomment-265651832","issue_url":"https://api.github.com/repos/facebook/osquery/issues/2823","id":265651832,"user":{"login":"vjon","id":4079953,"avatar_url":"https://avatars.githubusercontent.com/u/4079953?v=3","gravatar_id":"","url":"https://api.github.com/users/vjon","html_url":"https://github.com/vjon","followers_url":"https://api.github.com/users/vjon/followers","following_url":"https://api.github.com/users/vjon/following{/other_user}","gists_url":"https://api.github.com/users/vjon/gists{/gist_id}","starred_url":"https://api.github.com/users/vjon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjon/subscriptions","organizations_url":"https://api.github.com/users/vjon/orgs","repos_url":"https://api.github.com/users/vjon/repos","events_url":"https://api.github.com/users/vjon/events{/privacy}","received_events_url":"https://api.github.com/users/vjon/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T04:44:02Z","updated_at":"2016-12-08T04:44:02Z","body":"That would be a great help, thanks! Looks like I have the rest of the week to put a few polishing touches on this commit."}}
{"actor":{"display_login":"vjon"}}