{"action":"created","comment":{"url":"https://api.github.com/repos/TID-Lab/aggie/pulls/comments/88624302","pull_request_review_id":9191188,"id":88624302,"diff_hunk":"@@ -48,4 +48,12 @@ logger.error = function(error, metadata) {\n   else childProcess.sendToParent('log', { level: 'error', message: message, metadata: metadata });\n };\n \n+// Activity logger for users\n+logger.logActivity = function(logData) {\n+  var self = this;\n+  userLogger.writeToCollection(logData, function(err) {\n+    if (err) self.error(err);","path":"lib/logger.js","position":29,"original_position":29,"commit_id":"5f89550d9f52dc6cd5126475c53566332de3cfbe","original_commit_id":"5f89550d9f52dc6cd5126475c53566332de3cfbe","user":{"login":"pgarrison","id":5379348,"avatar_url":"https://avatars.githubusercontent.com/u/5379348?v=3","gravatar_id":"","url":"https://api.github.com/users/pgarrison","html_url":"https://github.com/pgarrison","followers_url":"https://api.github.com/users/pgarrison/followers","following_url":"https://api.github.com/users/pgarrison/following{/other_user}","gists_url":"https://api.github.com/users/pgarrison/gists{/gist_id}","starred_url":"https://api.github.com/users/pgarrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgarrison/subscriptions","organizations_url":"https://api.github.com/users/pgarrison/orgs","repos_url":"https://api.github.com/users/pgarrison/repos","events_url":"https://api.github.com/users/pgarrison/events{/privacy}","received_events_url":"https://api.github.com/users/pgarrison/received_events","type":"User","site_admin":false},"body":"And then this can just be `logger.error`","created_at":"2016-11-18T09:34:17Z","updated_at":"2016-11-18T09:34:17Z","html_url":"https://github.com/TID-Lab/aggie/pull/222#discussion_r88624302","pull_request_url":"https://api.github.com/repos/TID-Lab/aggie/pulls/222","_links":{"self":{"href":"https://api.github.com/repos/TID-Lab/aggie/pulls/comments/88624302"},"html":{"href":"https://github.com/TID-Lab/aggie/pull/222#discussion_r88624302"},"pull_request":{"href":"https://api.github.com/repos/TID-Lab/aggie/pulls/222"}}},"pull_request":{"url":"https://api.github.com/repos/TID-Lab/aggie/pulls/222","id":94118723,"html_url":"https://github.com/TID-Lab/aggie/pull/222","diff_url":"https://github.com/TID-Lab/aggie/pull/222.diff","patch_url":"https://github.com/TID-Lab/aggie/pull/222.patch","issue_url":"https://api.github.com/repos/TID-Lab/aggie/issues/222","number":222,"state":"open","locked":false,"title":"5356 logging","user":{"login":"karthiksbhat","id":4356187,"avatar_url":"https://avatars.githubusercontent.com/u/4356187?v=3","gravatar_id":"","url":"https://api.github.com/users/karthiksbhat","html_url":"https://github.com/karthiksbhat","followers_url":"https://api.github.com/users/karthiksbhat/followers","following_url":"https://api.github.com/users/karthiksbhat/following{/other_user}","gists_url":"https://api.github.com/users/karthiksbhat/gists{/gist_id}","starred_url":"https://api.github.com/users/karthiksbhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karthiksbhat/subscriptions","organizations_url":"https://api.github.com/users/karthiksbhat/orgs","repos_url":"https://api.github.com/users/karthiksbhat/repos","events_url":"https://api.github.com/users/karthiksbhat/events{/privacy}","received_events_url":"https://api.github.com/users/karthiksbhat/received_events","type":"User","site_admin":false},"body":"Log user interaction with Aggie. Storing actions like:\r\nReports read/flagged\r\nReport added to incident\r\nIncident created/edited/viewed\r\nSource created/edited/deleted","created_at":"2016-11-17T08:01:27Z","updated_at":"2016-11-18T09:44:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb4ee77332ba841af6518a36fc252e72208377e0","assignee":{"login":"pgarrison","id":5379348,"avatar_url":"https://avatars.githubusercontent.com/u/5379348?v=3","gravatar_id":"","url":"https://api.github.com/users/pgarrison","html_url":"https://github.com/pgarrison","followers_url":"https://api.github.com/users/pgarrison/followers","following_url":"https://api.github.com/users/pgarrison/following{/other_user}","gists_url":"https://api.github.com/users/pgarrison/gists{/gist_id}","starred_url":"https://api.github.com/users/pgarrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgarrison/subscriptions","organizations_url":"https://api.github.com/users/pgarrison/orgs","repos_url":"https://api.github.com/users/pgarrison/repos","events_url":"https://api.github.com/users/pgarrison/events{/privacy}","received_events_url":"https://api.github.com/users/pgarrison/received_events","type":"User","site_admin":false},"assignees":[{"login":"pgarrison","id":5379348,"avatar_url":"https://avatars.githubusercontent.com/u/5379348?v=3","gravatar_id":"","url":"https://api.github.com/users/pgarrison","html_url":"https://github.com/pgarrison","followers_url":"https://api.github.com/users/pgarrison/followers","following_url":"https://api.github.com/users/pgarrison/following{/other_user}","gists_url":"https://api.github.com/users/pgarrison/gists{/gist_id}","starred_url":"https://api.github.com/users/pgarrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgarrison/subscriptions","organizations_url":"https://api.github.com/users/pgarrison/orgs","repos_url":"https://api.github.com/users/pgarrison/repos","events_url":"https://api.github.com/users/pgarrison/events{/privacy}","received_events_url":"https://api.github.com/users/pgarrison/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/TID-Lab/aggie/milestones/5","html_url":"https://github.com/TID-Lab/aggie/milestones/2.5","labels_url":"https://api.github.com/repos/TID-Lab/aggie/milestones/5/labels","id":2118189,"number":5,"title":"2.5","description":"","creator":{"login":"pgarrison","id":5379348,"avatar_url":"https://avatars.githubusercontent.com/u/5379348?v=3","gravatar_id":"","url":"https://api.github.com/users/pgarrison","html_url":"https://github.com/pgarrison","followers_url":"https://api.github.com/users/pgarrison/followers","following_url":"https://api.github.com/users/pgarrison/following{/other_user}","gists_url":"https://api.github.com/users/pgarrison/gists{/gist_id}","starred_url":"https://api.github.com/users/pgarrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgarrison/subscriptions","organizations_url":"https://api.github.com/users/pgarrison/orgs","repos_url":"https://api.github.com/users/pgarrison/repos","events_url":"https://api.github.com/users/pgarrison/events{/privacy}","received_events_url":"https://api.github.com/users/pgarrison/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":4,"state":"open","created_at":"2016-11-07T07:54:30Z","updated_at":"2016-11-18T06:12:33Z","due_on":"2016-11-18T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/TID-Lab/aggie/pulls/222/commits","review_comments_url":"https://api.github.com/repos/TID-Lab/aggie/pulls/222/comments","review_comment_url":"https://api.github.com/repos/TID-Lab/aggie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TID-Lab/aggie/issues/222/comments","statuses_url":"https://api.github.com/repos/TID-Lab/aggie/statuses/5f89550d9f52dc6cd5126475c53566332de3cfbe","head":{"label":"TID-Lab:5356_logging","ref":"5356_logging","sha":"5f89550d9f52dc6cd5126475c53566332de3cfbe","user":{"login":"TID-Lab","id":6729022,"avatar_url":"https://avatars.githubusercontent.com/u/6729022?v=3","gravatar_id":"","url":"https://api.github.com/users/TID-Lab","html_url":"https://github.com/TID-Lab","followers_url":"https://api.github.com/users/TID-Lab/followers","following_url":"https://api.github.com/users/TID-Lab/following{/other_user}","gists_url":"https://api.github.com/users/TID-Lab/gists{/gist_id}","starred_url":"https://api.github.com/users/TID-Lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TID-Lab/subscriptions","organizations_url":"https://api.github.com/users/TID-Lab/orgs","repos_url":"https://api.github.com/users/TID-Lab/repos","events_url":"https://api.github.com/users/TID-Lab/events{/privacy}","received_events_url":"https://api.github.com/users/TID-Lab/received_events","type":"Organization","site_admin":false},"repo":{"id":17260493,"name":"aggie","full_name":"TID-Lab/aggie","owner":{"login":"TID-Lab","id":6729022,"avatar_url":"https://avatars.githubusercontent.com/u/6729022?v=3","gravatar_id":"","url":"https://api.github.com/users/TID-Lab","html_url":"https://github.com/TID-Lab","followers_url":"https://api.github.com/users/TID-Lab/followers","following_url":"https://api.github.com/users/TID-Lab/following{/other_user}","gists_url":"https://api.github.com/users/TID-Lab/gists{/gist_id}","starred_url":"https://api.github.com/users/TID-Lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TID-Lab/subscriptions","organizations_url":"https://api.github.com/users/TID-Lab/orgs","repos_url":"https://api.github.com/users/TID-Lab/repos","events_url":"https://api.github.com/users/TID-Lab/events{/privacy}","received_events_url":"https://api.github.com/users/TID-Lab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TID-Lab/aggie","description":"Aggie is a web application for using social media and other resources to track incidents around real-time events such as elections or natural disasters.","fork":false,"url":"https://api.github.com/repos/TID-Lab/aggie","forks_url":"https://api.github.com/repos/TID-Lab/aggie/forks","keys_url":"https://api.github.com/repos/TID-Lab/aggie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TID-Lab/aggie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TID-Lab/aggie/teams","hooks_url":"https://api.github.com/repos/TID-Lab/aggie/hooks","issue_events_url":"https://api.github.com/repos/TID-Lab/aggie/issues/events{/number}","events_url":"https://api.github.com/repos/TID-Lab/aggie/events","assignees_url":"https://api.github.com/repos/TID-Lab/aggie/assignees{/user}","branches_url":"https://api.github.com/repos/TID-Lab/aggie/branches{/branch}","tags_url":"https://api.github.com/repos/TID-Lab/aggie/tags","blobs_url":"https://api.github.com/repos/TID-Lab/aggie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TID-Lab/aggie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TID-Lab/aggie/git/refs{/sha}","trees_url":"https://api.github.com/repos/TID-Lab/aggie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TID-Lab/aggie/statuses/{sha}","languages_url":"https://api.github.com/repos/TID-Lab/aggie/languages","stargazers_url":"https://api.github.com/repos/TID-Lab/aggie/stargazers","contributors_url":"https://api.github.com/repos/TID-Lab/aggie/contributors","subscribers_url":"https://api.github.com/repos/TID-Lab/aggie/subscribers","subscription_url":"https://api.github.com/repos/TID-Lab/aggie/subscription","commits_url":"https://api.github.com/repos/TID-Lab/aggie/commits{/sha}","git_commits_url":"https://api.github.com/repos/TID-Lab/aggie/git/commits{/sha}","comments_url":"https://api.github.com/repos/TID-Lab/aggie/comments{/number}","issue_comment_url":"https://api.github.com/repos/TID-Lab/aggie/issues/comments{/number}","contents_url":"https://api.github.com/repos/TID-Lab/aggie/contents/{+path}","compare_url":"https://api.github.com/repos/TID-Lab/aggie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TID-Lab/aggie/merges","archive_url":"https://api.github.com/repos/TID-Lab/aggie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TID-Lab/aggie/downloads","issues_url":"https://api.github.com/repos/TID-Lab/aggie/issues{/number}","pulls_url":"https://api.github.com/repos/TID-Lab/aggie/pulls{/number}","milestones_url":"https://api.github.com/repos/TID-Lab/aggie/milestones{/number}","notifications_url":"https://api.github.com/repos/TID-Lab/aggie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TID-Lab/aggie/labels{/name}","releases_url":"https://api.github.com/repos/TID-Lab/aggie/releases{/id}","deployments_url":"https://api.github.com/repos/TID-Lab/aggie/deployments","created_at":"2014-02-27T19:00:48Z","updated_at":"2016-10-25T04:01:50Z","pushed_at":"2016-11-18T09:14:34Z","git_url":"git://github.com/TID-Lab/aggie.git","ssh_url":"git@github.com:TID-Lab/aggie.git","clone_url":"https://github.com/TID-Lab/aggie.git","svn_url":"https://github.com/TID-Lab/aggie","homepage":"","size":12307,"stargazers_count":16,"watchers_count":16,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":5,"forks":10,"open_issues":5,"watchers":16,"default_branch":"develop"}},"base":{"label":"TID-Lab:develop","ref":"develop","sha":"14b079f00580b939d9324f82dec73793c8f76300","user":{"login":"TID-Lab","id":6729022,"avatar_url":"https://avatars.githubusercontent.com/u/6729022?v=3","gravatar_id":"","url":"https://api.github.com/users/TID-Lab","html_url":"https://github.com/TID-Lab","followers_url":"https://api.github.com/users/TID-Lab/followers","following_url":"https://api.github.com/users/TID-Lab/following{/other_user}","gists_url":"https://api.github.com/users/TID-Lab/gists{/gist_id}","starred_url":"https://api.github.com/users/TID-Lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TID-Lab/subscriptions","organizations_url":"https://api.github.com/users/TID-Lab/orgs","repos_url":"https://api.github.com/users/TID-Lab/repos","events_url":"https://api.github.com/users/TID-Lab/events{/privacy}","received_events_url":"https://api.github.com/users/TID-Lab/received_events","type":"Organization","site_admin":false},"repo":{"id":17260493,"name":"aggie","full_name":"TID-Lab/aggie","owner":{"login":"TID-Lab","id":6729022,"avatar_url":"https://avatars.githubusercontent.com/u/6729022?v=3","gravatar_id":"","url":"https://api.github.com/users/TID-Lab","html_url":"https://github.com/TID-Lab","followers_url":"https://api.github.com/users/TID-Lab/followers","following_url":"https://api.github.com/users/TID-Lab/following{/other_user}","gists_url":"https://api.github.com/users/TID-Lab/gists{/gist_id}","starred_url":"https://api.github.com/users/TID-Lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TID-Lab/subscriptions","organizations_url":"https://api.github.com/users/TID-Lab/orgs","repos_url":"https://api.github.com/users/TID-Lab/repos","events_url":"https://api.github.com/users/TID-Lab/events{/privacy}","received_events_url":"https://api.github.com/users/TID-Lab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TID-Lab/aggie","description":"Aggie is a web application for using social media and other resources to track incidents around real-time events such as elections or natural disasters.","fork":false,"url":"https://api.github.com/repos/TID-Lab/aggie","forks_url":"https://api.github.com/repos/TID-Lab/aggie/forks","keys_url":"https://api.github.com/repos/TID-Lab/aggie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TID-Lab/aggie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TID-Lab/aggie/teams","hooks_url":"https://api.github.com/repos/TID-Lab/aggie/hooks","issue_events_url":"https://api.github.com/repos/TID-Lab/aggie/issues/events{/number}","events_url":"https://api.github.com/repos/TID-Lab/aggie/events","assignees_url":"https://api.github.com/repos/TID-Lab/aggie/assignees{/user}","branches_url":"https://api.github.com/repos/TID-Lab/aggie/branches{/branch}","tags_url":"https://api.github.com/repos/TID-Lab/aggie/tags","blobs_url":"https://api.github.com/repos/TID-Lab/aggie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TID-Lab/aggie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TID-Lab/aggie/git/refs{/sha}","trees_url":"https://api.github.com/repos/TID-Lab/aggie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TID-Lab/aggie/statuses/{sha}","languages_url":"https://api.github.com/repos/TID-Lab/aggie/languages","stargazers_url":"https://api.github.com/repos/TID-Lab/aggie/stargazers","contributors_url":"https://api.github.com/repos/TID-Lab/aggie/contributors","subscribers_url":"https://api.github.com/repos/TID-Lab/aggie/subscribers","subscription_url":"https://api.github.com/repos/TID-Lab/aggie/subscription","commits_url":"https://api.github.com/repos/TID-Lab/aggie/commits{/sha}","git_commits_url":"https://api.github.com/repos/TID-Lab/aggie/git/commits{/sha}","comments_url":"https://api.github.com/repos/TID-Lab/aggie/comments{/number}","issue_comment_url":"https://api.github.com/repos/TID-Lab/aggie/issues/comments{/number}","contents_url":"https://api.github.com/repos/TID-Lab/aggie/contents/{+path}","compare_url":"https://api.github.com/repos/TID-Lab/aggie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TID-Lab/aggie/merges","archive_url":"https://api.github.com/repos/TID-Lab/aggie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TID-Lab/aggie/downloads","issues_url":"https://api.github.com/repos/TID-Lab/aggie/issues{/number}","pulls_url":"https://api.github.com/repos/TID-Lab/aggie/pulls{/number}","milestones_url":"https://api.github.com/repos/TID-Lab/aggie/milestones{/number}","notifications_url":"https://api.github.com/repos/TID-Lab/aggie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TID-Lab/aggie/labels{/name}","releases_url":"https://api.github.com/repos/TID-Lab/aggie/releases{/id}","deployments_url":"https://api.github.com/repos/TID-Lab/aggie/deployments","created_at":"2014-02-27T19:00:48Z","updated_at":"2016-10-25T04:01:50Z","pushed_at":"2016-11-18T09:14:34Z","git_url":"git://github.com/TID-Lab/aggie.git","ssh_url":"git@github.com:TID-Lab/aggie.git","clone_url":"https://github.com/TID-Lab/aggie.git","svn_url":"https://github.com/TID-Lab/aggie","homepage":"","size":12307,"stargazers_count":16,"watchers_count":16,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":5,"forks":10,"open_issues":5,"watchers":16,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/TID-Lab/aggie/pulls/222"},"html":{"href":"https://github.com/TID-Lab/aggie/pull/222"},"issue":{"href":"https://api.github.com/repos/TID-Lab/aggie/issues/222"},"comments":{"href":"https://api.github.com/repos/TID-Lab/aggie/issues/222/comments"},"review_comments":{"href":"https://api.github.com/repos/TID-Lab/aggie/pulls/222/comments"},"review_comment":{"href":"https://api.github.com/repos/TID-Lab/aggie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TID-Lab/aggie/pulls/222/commits"},"statuses":{"href":"https://api.github.com/repos/TID-Lab/aggie/statuses/5f89550d9f52dc6cd5126475c53566332de3cfbe"}}}}
{"actor":{"display_login":"pgarrison"}}