GitHub PullRequestReviewCommentEvent at 2014-10-17 00:57:43
Repository: davitpy
Actor: asreimer
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls/comments/18996670","id":18996670,"diff_hunk":"@@ -310,14 +303,14 @@ def dbConnect(self):\n         \"\"\"\n         from pymongo import MongoClient\n         import sys\n-        #print self.db_user,self.db_pswd,self.db_host, self.db_name\n+        #logger.debug(self.db_user + ' ' + self.db_pswd + ' ' + self.db_host + ' ' + self.db_name)\n         uri='mongodb://{0}:{1}@{2}/{3}'.format(self.db_user, self.db_pswd, self.db_host, self.db_name)\n-        #print uri\n+        #logger.debug(uri)\n         try:\n             conn = MongoClient(uri) \n             dba = conn[self.db_name]\n         except:\n-            print 'Could not connect to remote DB: ', sys.exc_info()[0]\n+            logger.error('Could not connect to remote DB: ', sys.exc_info()[0])","path":"pydarn/radar/radInfoIo.py","position":101,"original_position":101,"commit_id":"2805eb13715592c927f0eef98ce1baf2a647e34f","original_commit_id":"2805eb13715592c927f0eef98ce1baf2a647e34f","user":{"login":"asreimer","id":4604819,"avatar_url":"https://avatars.githubusercontent.com/u/4604819?v=2","gravatar_id":"","url":"https://api.github.com/users/asreimer","html_url":"https://github.com/asreimer","followers_url":"https://api.github.com/users/asreimer/followers","following_url":"https://api.github.com/users/asreimer/following{/other_user}","gists_url":"https://api.github.com/users/asreimer/gists{/gist_id}","starred_url":"https://api.github.com/users/asreimer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asreimer/subscriptions","organizations_url":"https://api.github.com/users/asreimer/orgs","repos_url":"https://api.github.com/users/asreimer/repos","events_url":"https://api.github.com/users/asreimer/events{/privacy}","received_events_url":"https://api.github.com/users/asreimer/received_events","type":"User","site_admin":false},"body":"Change this line to:\r\n`logger.exception('Could not connect to remote DB.)`","created_at":"2014-10-17T00:57:43Z","updated_at":"2014-10-17T00:57:43Z","html_url":"https://github.com/vtsuperdarn/davitpy/pull/109#discussion_r18996670","pull_request_url":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls/109","_links":{"self":{"href":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls/comments/18996670"},"html":{"href":"https://github.com/vtsuperdarn/davitpy/pull/109#discussion_r18996670"},"pull_request":{"href":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls/109","id":22064818,"html_url":"https://github.com/vtsuperdarn/davitpy/pull/109","diff_url":"https://github.com/vtsuperdarn/davitpy/pull/109.diff","patch_url":"https://github.com/vtsuperdarn/davitpy/pull/109.patch","issue_url":"https://api.github.com/repos/vtsuperdarn/davitpy/issues/109","number":109,"state":"open","locked":false,"title":"implement logging instead of print statements","user":{"login":"cmeeren","id":7766733,"avatar_url":"https://avatars.githubusercontent.com/u/7766733?v=2","gravatar_id":"","url":"https://api.github.com/users/cmeeren","html_url":"https://github.com/cmeeren","followers_url":"https://api.github.com/users/cmeeren/followers","following_url":"https://api.github.com/users/cmeeren/following{/other_user}","gists_url":"https://api.github.com/users/cmeeren/gists{/gist_id}","starred_url":"https://api.github.com/users/cmeeren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmeeren/subscriptions","organizations_url":"https://api.github.com/users/cmeeren/orgs","repos_url":"https://api.github.com/users/cmeeren/repos","events_url":"https://api.github.com/users/cmeeren/events{/privacy}","received_events_url":"https://api.github.com/users/cmeeren/received_events","type":"User","site_admin":false},"body":"This pull request replaces most print statements with the built-in logging functionality. This allows the user control over what is actually printed to the console: For example, running\r\n\r\n```python\r\nimport logging\r\nlogging.getLogger().setLevel(logging.INFO)\r\n```\r\nwill show INFO level messages and all more severe messages (WARNING, ERROR,  CRITICAL), while the ``logging.WARNING`` level will not show the INFO messages. By default, the WARNING level is active and thus INFO and DEBUG messages will not be shown.\r\n\r\nAdditionally, using the logging module allows for easy saving of logs to files, etc. The actual format of the logging messages can also be customized. All settings can be set both programatically and using config files (INI, JSON, YAML), but everything is left at defaults for now.\r\n\r\nI have not touched any of the print statements where some kind of ``debug`` or ``verbose`` flag controlled their behaviour. I also did not touch print statements in ``if __name__ == '__main__'`` sections.\r\n\r\nI also fixed two missing ``import sys``, which is not related to logging, but were so small and safe edits that I did them on the go.","created_at":"2014-10-01T10:50:24Z","updated_at":"2014-10-17T00:57:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1beb66ac850b4ed7523b1bdf2ca31ea3991324d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls/109/commits","review_comments_url":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls/109/comments","review_comment_url":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/vtsuperdarn/davitpy/issues/109/comments","statuses_url":"https://api.github.com/repos/vtsuperdarn/davitpy/statuses/2805eb13715592c927f0eef98ce1baf2a647e34f","head":{"label":"vtsuperdarn:feature_logging","ref":"feature_logging","sha":"2805eb13715592c927f0eef98ce1baf2a647e34f","user":{"login":"vtsuperdarn","id":1429584,"avatar_url":"https://avatars.githubusercontent.com/u/1429584?v=2","gravatar_id":"","url":"https://api.github.com/users/vtsuperdarn","html_url":"https://github.com/vtsuperdarn","followers_url":"https://api.github.com/users/vtsuperdarn/followers","following_url":"https://api.github.com/users/vtsuperdarn/following{/other_user}","gists_url":"https://api.github.com/users/vtsuperdarn/gists{/gist_id}","starred_url":"https://api.github.com/users/vtsuperdarn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtsuperdarn/subscriptions","organizations_url":"https://api.github.com/users/vtsuperdarn/orgs","repos_url":"https://api.github.com/users/vtsuperdarn/repos","events_url":"https://api.github.com/users/vtsuperdarn/events{/privacy}","received_events_url":"https://api.github.com/users/vtsuperdarn/received_events","type":"Organization","site_admin":false},"repo":{"id":4594803,"name":"davitpy","full_name":"vtsuperdarn/davitpy","owner":{"login":"vtsuperdarn","id":1429584,"avatar_url":"https://avatars.githubusercontent.com/u/1429584?v=2","gravatar_id":"","url":"https://api.github.com/users/vtsuperdarn","html_url":"https://github.com/vtsuperdarn","followers_url":"https://api.github.com/users/vtsuperdarn/followers","following_url":"https://api.github.com/users/vtsuperdarn/following{/other_user}","gists_url":"https://api.github.com/users/vtsuperdarn/gists{/gist_id}","starred_url":"https://api.github.com/users/vtsuperdarn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtsuperdarn/subscriptions","organizations_url":"https://api.github.com/users/vtsuperdarn/orgs","repos_url":"https://api.github.com/users/vtsuperdarn/repos","events_url":"https://api.github.com/users/vtsuperdarn/events{/privacy}","received_events_url":"https://api.github.com/users/vtsuperdarn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vtsuperdarn/davitpy","description":"The DaViT Python project","fork":false,"url":"https://api.github.com/repos/vtsuperdarn/davitpy","forks_url":"https://api.github.com/repos/vtsuperdarn/davitpy/forks","keys_url":"https://api.github.com/repos/vtsuperdarn/davitpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vtsuperdarn/davitpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vtsuperdarn/davitpy/teams","hooks_url":"https://api.github.com/repos/vtsuperdarn/davitpy/hooks","issue_events_url":"https://api.github.com/repos/vtsuperdarn/davitpy/issues/events{/number}","events_url":"https://api.github.com/repos/vtsuperdarn/davitpy/events","assignees_url":"https://api.github.com/repos/vtsuperdarn/davitpy/assignees{/user}","branches_url":"https://api.github.com/repos/vtsuperdarn/davitpy/branches{/branch}","tags_url":"https://api.github.com/repos/vtsuperdarn/davitpy/tags","blobs_url":"https://api.github.com/repos/vtsuperdarn/davitpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vtsuperdarn/davitpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vtsuperdarn/davitpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/vtsuperdarn/davitpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vtsuperdarn/davitpy/statuses/{sha}","languages_url":"https://api.github.com/repos/vtsuperdarn/davitpy/languages","stargazers_url":"https://api.github.com/repos/vtsuperdarn/davitpy/stargazers","contributors_url":"https://api.github.com/repos/vtsuperdarn/davitpy/contributors","subscribers_url":"https://api.github.com/repos/vtsuperdarn/davitpy/subscribers","subscription_url":"https://api.github.com/repos/vtsuperdarn/davitpy/subscription","commits_url":"https://api.github.com/repos/vtsuperdarn/davitpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/vtsuperdarn/davitpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/vtsuperdarn/davitpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/vtsuperdarn/davitpy/issues/comments/{number}","contents_url":"https://api.github.com/repos/vtsuperdarn/davitpy/contents/{+path}","compare_url":"https://api.github.com/repos/vtsuperdarn/davitpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vtsuperdarn/davitpy/merges","archive_url":"https://api.github.com/repos/vtsuperdarn/davitpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vtsuperdarn/davitpy/downloads","issues_url":"https://api.github.com/repos/vtsuperdarn/davitpy/issues{/number}","pulls_url":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls{/number}","milestones_url":"https://api.github.com/repos/vtsuperdarn/davitpy/milestones{/number}","notifications_url":"https://api.github.com/repos/vtsuperdarn/davitpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vtsuperdarn/davitpy/labels{/name}","releases_url":"https://api.github.com/repos/vtsuperdarn/davitpy/releases{/id}","created_at":"2012-06-08T07:37:19Z","updated_at":"2014-09-30T17:31:21Z","pushed_at":"2014-10-16T23:41:49Z","git_url":"git://github.com/vtsuperdarn/davitpy.git","ssh_url":"git@github.com:vtsuperdarn/davitpy.git","clone_url":"https://github.com/vtsuperdarn/davitpy.git","svn_url":"https://github.com/vtsuperdarn/davitpy","homepage":"http://vtsuperdarn.github.com/davitpy/","size":50535,"stargazers_count":10,"watchers_count":10,"language":"FORTRAN","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":20,"forks":15,"open_issues":20,"watchers":10,"default_branch":"master"}},"base":{"label":"vtsuperdarn:develop","ref":"develop","sha":"1b6d2d09cf68146194441a66171a6e0692dcdcbc","user":{"login":"vtsuperdarn","id":1429584,"avatar_url":"https://avatars.githubusercontent.com/u/1429584?v=2","gravatar_id":"","url":"https://api.github.com/users/vtsuperdarn","html_url":"https://github.com/vtsuperdarn","followers_url":"https://api.github.com/users/vtsuperdarn/followers","following_url":"https://api.github.com/users/vtsuperdarn/following{/other_user}","gists_url":"https://api.github.com/users/vtsuperdarn/gists{/gist_id}","starred_url":"https://api.github.com/users/vtsuperdarn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtsuperdarn/subscriptions","organizations_url":"https://api.github.com/users/vtsuperdarn/orgs","repos_url":"https://api.github.com/users/vtsuperdarn/repos","events_url":"https://api.github.com/users/vtsuperdarn/events{/privacy}","received_events_url":"https://api.github.com/users/vtsuperdarn/received_events","type":"Organization","site_admin":false},"repo":{"id":4594803,"name":"davitpy","full_name":"vtsuperdarn/davitpy","owner":{"login":"vtsuperdarn","id":1429584,"avatar_url":"https://avatars.githubusercontent.com/u/1429584?v=2","gravatar_id":"","url":"https://api.github.com/users/vtsuperdarn","html_url":"https://github.com/vtsuperdarn","followers_url":"https://api.github.com/users/vtsuperdarn/followers","following_url":"https://api.github.com/users/vtsuperdarn/following{/other_user}","gists_url":"https://api.github.com/users/vtsuperdarn/gists{/gist_id}","starred_url":"https://api.github.com/users/vtsuperdarn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtsuperdarn/subscriptions","organizations_url":"https://api.github.com/users/vtsuperdarn/orgs","repos_url":"https://api.github.com/users/vtsuperdarn/repos","events_url":"https://api.github.com/users/vtsuperdarn/events{/privacy}","received_events_url":"https://api.github.com/users/vtsuperdarn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vtsuperdarn/davitpy","description":"The DaViT Python project","fork":false,"url":"https://api.github.com/repos/vtsuperdarn/davitpy","forks_url":"https://api.github.com/repos/vtsuperdarn/davitpy/forks","keys_url":"https://api.github.com/repos/vtsuperdarn/davitpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vtsuperdarn/davitpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vtsuperdarn/davitpy/teams","hooks_url":"https://api.github.com/repos/vtsuperdarn/davitpy/hooks","issue_events_url":"https://api.github.com/repos/vtsuperdarn/davitpy/issues/events{/number}","events_url":"https://api.github.com/repos/vtsuperdarn/davitpy/events","assignees_url":"https://api.github.com/repos/vtsuperdarn/davitpy/assignees{/user}","branches_url":"https://api.github.com/repos/vtsuperdarn/davitpy/branches{/branch}","tags_url":"https://api.github.com/repos/vtsuperdarn/davitpy/tags","blobs_url":"https://api.github.com/repos/vtsuperdarn/davitpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vtsuperdarn/davitpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vtsuperdarn/davitpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/vtsuperdarn/davitpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vtsuperdarn/davitpy/statuses/{sha}","languages_url":"https://api.github.com/repos/vtsuperdarn/davitpy/languages","stargazers_url":"https://api.github.com/repos/vtsuperdarn/davitpy/stargazers","contributors_url":"https://api.github.com/repos/vtsuperdarn/davitpy/contributors","subscribers_url":"https://api.github.com/repos/vtsuperdarn/davitpy/subscribers","subscription_url":"https://api.github.com/repos/vtsuperdarn/davitpy/subscription","commits_url":"https://api.github.com/repos/vtsuperdarn/davitpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/vtsuperdarn/davitpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/vtsuperdarn/davitpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/vtsuperdarn/davitpy/issues/comments/{number}","contents_url":"https://api.github.com/repos/vtsuperdarn/davitpy/contents/{+path}","compare_url":"https://api.github.com/repos/vtsuperdarn/davitpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vtsuperdarn/davitpy/merges","archive_url":"https://api.github.com/repos/vtsuperdarn/davitpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vtsuperdarn/davitpy/downloads","issues_url":"https://api.github.com/repos/vtsuperdarn/davitpy/issues{/number}","pulls_url":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls{/number}","milestones_url":"https://api.github.com/repos/vtsuperdarn/davitpy/milestones{/number}","notifications_url":"https://api.github.com/repos/vtsuperdarn/davitpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vtsuperdarn/davitpy/labels{/name}","releases_url":"https://api.github.com/repos/vtsuperdarn/davitpy/releases{/id}","created_at":"2012-06-08T07:37:19Z","updated_at":"2014-09-30T17:31:21Z","pushed_at":"2014-10-16T23:41:49Z","git_url":"git://github.com/vtsuperdarn/davitpy.git","ssh_url":"git@github.com:vtsuperdarn/davitpy.git","clone_url":"https://github.com/vtsuperdarn/davitpy.git","svn_url":"https://github.com/vtsuperdarn/davitpy","homepage":"http://vtsuperdarn.github.com/davitpy/","size":50535,"stargazers_count":10,"watchers_count":10,"language":"FORTRAN","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":20,"forks":15,"open_issues":20,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls/109"},"html":{"href":"https://github.com/vtsuperdarn/davitpy/pull/109"},"issue":{"href":"https://api.github.com/repos/vtsuperdarn/davitpy/issues/109"},"comments":{"href":"https://api.github.com/repos/vtsuperdarn/davitpy/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/vtsuperdarn/davitpy/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/vtsuperdarn/davitpy/statuses/2805eb13715592c927f0eef98ce1baf2a647e34f"}}}}