GitHub PullRequestReviewCommentEvent at 2014-07-28 10:38:16
Repository: contextlog
Actor: shoonoise
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/yandex-sysmon/contextlog/pulls/comments/15455874","id":15455874,"diff_hunk":"@@ -0,0 +1,115 @@\n+import inspect\n+import logging\n+import string\n+import pprint\n+import importlib\n+\n+\n+# =====\n+def get_logger(name, bind=1, **context):\n+    for (frame, _, _, _, _, _) in inspect.stack()[1:]:\n+        if \"__logger_context\" in frame.f_locals:\n+            context = _get_new_context(frame.f_locals[\"__logger_context\"], context)\n+            break\n+    inspect.stack()[bind][0].f_locals[\"__logger_context\"] = context\n+    return _ContextLogger(logging.getLogger(name), context=context)\n+\n+\n+getlogger = get_logger  # pylint: disable=C0103\n+\n+\n+def _get_new_context(old_context, new_context):\n+    context = old_context.copy()\n+    context.update(new_context)\n+    return context\n+\n+\n+class _ContextLogger(logging.Logger):  # pylint: disable=R0904","path":"contextlog/__init__.py","position":27,"original_position":27,"commit_id":"2da2e369769badd5c2357ff061165f4f25434320","original_commit_id":"2da2e369769badd5c2357ff061165f4f25434320","user":{"login":"shoonoise","id":2296996,"avatar_url":"https://avatars.githubusercontent.com/u/2296996?","gravatar_id":"6e7c716804d014db2da61ec0c1e3f086","url":"https://api.github.com/users/shoonoise","html_url":"https://github.com/shoonoise","followers_url":"https://api.github.com/users/shoonoise/followers","following_url":"https://api.github.com/users/shoonoise/following{/other_user}","gists_url":"https://api.github.com/users/shoonoise/gists{/gist_id}","starred_url":"https://api.github.com/users/shoonoise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoonoise/subscriptions","organizations_url":"https://api.github.com/users/shoonoise/orgs","repos_url":"https://api.github.com/users/shoonoise/repos","events_url":"https://api.github.com/users/shoonoise/events{/privacy}","received_events_url":"https://api.github.com/users/shoonoise/received_events","type":"User","site_admin":false},"body":"Why class name starts from underscore?","created_at":"2014-07-28T10:38:16Z","updated_at":"2014-07-28T10:38:16Z","html_url":"https://github.com/yandex-sysmon/contextlog/pull/1#discussion_r15455874","pull_request_url":"https://api.github.com/repos/yandex-sysmon/contextlog/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/yandex-sysmon/contextlog/pulls/comments/15455874"},"html":{"href":"https://github.com/yandex-sysmon/contextlog/pull/1#discussion_r15455874"},"pull_request":{"href":"https://api.github.com/repos/yandex-sysmon/contextlog/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/yandex-sysmon/contextlog/pulls/1","id":18842077,"html_url":"https://github.com/yandex-sysmon/contextlog/pull/1","diff_url":"https://github.com/yandex-sysmon/contextlog/pull/1.diff","patch_url":"https://github.com/yandex-sysmon/contextlog/pull/1.patch","issue_url":"https://api.github.com/repos/yandex-sysmon/contextlog/issues/1","number":1,"state":"open","title":"Contextlog implementation","user":{"login":"mdevaev","id":416259,"avatar_url":"https://avatars.githubusercontent.com/u/416259?","gravatar_id":"30739fb9758346d44ba8a46335286a43","url":"https://api.github.com/users/mdevaev","html_url":"https://github.com/mdevaev","followers_url":"https://api.github.com/users/mdevaev/followers","following_url":"https://api.github.com/users/mdevaev/following{/other_user}","gists_url":"https://api.github.com/users/mdevaev/gists{/gist_id}","starred_url":"https://api.github.com/users/mdevaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdevaev/subscriptions","organizations_url":"https://api.github.com/users/mdevaev/orgs","repos_url":"https://api.github.com/users/mdevaev/repos","events_url":"https://api.github.com/users/mdevaev/events{/privacy}","received_events_url":"https://api.github.com/users/mdevaev/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-07-24T14:55:39Z","updated_at":"2014-07-28T10:38:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"619c321b0f5a31d024d07272c4607d583aa2fccf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yandex-sysmon/contextlog/pulls/1/commits","review_comments_url":"https://api.github.com/repos/yandex-sysmon/contextlog/pulls/1/comments","review_comment_url":"https://api.github.com/repos/yandex-sysmon/contextlog/pulls/comments/{number}","comments_url":"https://api.github.com/repos/yandex-sysmon/contextlog/issues/1/comments","statuses_url":"https://api.github.com/repos/yandex-sysmon/contextlog/statuses/2da2e369769badd5c2357ff061165f4f25434320","head":{"label":"mdevaev:master","ref":"master","sha":"2da2e369769badd5c2357ff061165f4f25434320","user":{"login":"mdevaev","id":416259,"avatar_url":"https://avatars.githubusercontent.com/u/416259?","gravatar_id":"30739fb9758346d44ba8a46335286a43","url":"https://api.github.com/users/mdevaev","html_url":"https://github.com/mdevaev","followers_url":"https://api.github.com/users/mdevaev/followers","following_url":"https://api.github.com/users/mdevaev/following{/other_user}","gists_url":"https://api.github.com/users/mdevaev/gists{/gist_id}","starred_url":"https://api.github.com/users/mdevaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdevaev/subscriptions","organizations_url":"https://api.github.com/users/mdevaev/orgs","repos_url":"https://api.github.com/users/mdevaev/repos","events_url":"https://api.github.com/users/mdevaev/events{/privacy}","received_events_url":"https://api.github.com/users/mdevaev/received_events","type":"User","site_admin":false},"repo":{"id":22216318,"name":"contextlog","full_name":"mdevaev/contextlog","owner":{"login":"mdevaev","id":416259,"avatar_url":"https://avatars.githubusercontent.com/u/416259?","gravatar_id":"30739fb9758346d44ba8a46335286a43","url":"https://api.github.com/users/mdevaev","html_url":"https://github.com/mdevaev","followers_url":"https://api.github.com/users/mdevaev/followers","following_url":"https://api.github.com/users/mdevaev/following{/other_user}","gists_url":"https://api.github.com/users/mdevaev/gists{/gist_id}","starred_url":"https://api.github.com/users/mdevaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdevaev/subscriptions","organizations_url":"https://api.github.com/users/mdevaev/orgs","repos_url":"https://api.github.com/users/mdevaev/repos","events_url":"https://api.github.com/users/mdevaev/events{/privacy}","received_events_url":"https://api.github.com/users/mdevaev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mdevaev/contextlog","description":"Context-based logger and formatter","fork":true,"url":"https://api.github.com/repos/mdevaev/contextlog","forks_url":"https://api.github.com/repos/mdevaev/contextlog/forks","keys_url":"https://api.github.com/repos/mdevaev/contextlog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdevaev/contextlog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdevaev/contextlog/teams","hooks_url":"https://api.github.com/repos/mdevaev/contextlog/hooks","issue_events_url":"https://api.github.com/repos/mdevaev/contextlog/issues/events{/number}","events_url":"https://api.github.com/repos/mdevaev/contextlog/events","assignees_url":"https://api.github.com/repos/mdevaev/contextlog/assignees{/user}","branches_url":"https://api.github.com/repos/mdevaev/contextlog/branches{/branch}","tags_url":"https://api.github.com/repos/mdevaev/contextlog/tags","blobs_url":"https://api.github.com/repos/mdevaev/contextlog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdevaev/contextlog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdevaev/contextlog/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdevaev/contextlog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdevaev/contextlog/statuses/{sha}","languages_url":"https://api.github.com/repos/mdevaev/contextlog/languages","stargazers_url":"https://api.github.com/repos/mdevaev/contextlog/stargazers","contributors_url":"https://api.github.com/repos/mdevaev/contextlog/contributors","subscribers_url":"https://api.github.com/repos/mdevaev/contextlog/subscribers","subscription_url":"https://api.github.com/repos/mdevaev/contextlog/subscription","commits_url":"https://api.github.com/repos/mdevaev/contextlog/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdevaev/contextlog/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdevaev/contextlog/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdevaev/contextlog/issues/comments/{number}","contents_url":"https://api.github.com/repos/mdevaev/contextlog/contents/{+path}","compare_url":"https://api.github.com/repos/mdevaev/contextlog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdevaev/contextlog/merges","archive_url":"https://api.github.com/repos/mdevaev/contextlog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdevaev/contextlog/downloads","issues_url":"https://api.github.com/repos/mdevaev/contextlog/issues{/number}","pulls_url":"https://api.github.com/repos/mdevaev/contextlog/pulls{/number}","milestones_url":"https://api.github.com/repos/mdevaev/contextlog/milestones{/number}","notifications_url":"https://api.github.com/repos/mdevaev/contextlog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdevaev/contextlog/labels{/name}","releases_url":"https://api.github.com/repos/mdevaev/contextlog/releases{/id}","created_at":"2014-07-24T14:35:21Z","updated_at":"2014-07-24T14:37:11Z","pushed_at":"2014-07-25T16:15:37Z","git_url":"git://github.com/mdevaev/contextlog.git","ssh_url":"git@github.com:mdevaev/contextlog.git","clone_url":"https://github.com/mdevaev/contextlog.git","svn_url":"https://github.com/mdevaev/contextlog","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yandex-sysmon:master","ref":"master","sha":"c629404565c45f2877f15a5d9af474bfe45790e0","user":{"login":"yandex-sysmon","id":5229177,"avatar_url":"https://avatars.githubusercontent.com/u/5229177?","gravatar_id":"28c12f4cbdea361456ccfd12c012da8d","url":"https://api.github.com/users/yandex-sysmon","html_url":"https://github.com/yandex-sysmon","followers_url":"https://api.github.com/users/yandex-sysmon/followers","following_url":"https://api.github.com/users/yandex-sysmon/following{/other_user}","gists_url":"https://api.github.com/users/yandex-sysmon/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex-sysmon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex-sysmon/subscriptions","organizations_url":"https://api.github.com/users/yandex-sysmon/orgs","repos_url":"https://api.github.com/users/yandex-sysmon/repos","events_url":"https://api.github.com/users/yandex-sysmon/events{/privacy}","received_events_url":"https://api.github.com/users/yandex-sysmon/received_events","type":"Organization","site_admin":false},"repo":{"id":22216242,"name":"contextlog","full_name":"yandex-sysmon/contextlog","owner":{"login":"yandex-sysmon","id":5229177,"avatar_url":"https://avatars.githubusercontent.com/u/5229177?","gravatar_id":"28c12f4cbdea361456ccfd12c012da8d","url":"https://api.github.com/users/yandex-sysmon","html_url":"https://github.com/yandex-sysmon","followers_url":"https://api.github.com/users/yandex-sysmon/followers","following_url":"https://api.github.com/users/yandex-sysmon/following{/other_user}","gists_url":"https://api.github.com/users/yandex-sysmon/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex-sysmon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex-sysmon/subscriptions","organizations_url":"https://api.github.com/users/yandex-sysmon/orgs","repos_url":"https://api.github.com/users/yandex-sysmon/repos","events_url":"https://api.github.com/users/yandex-sysmon/events{/privacy}","received_events_url":"https://api.github.com/users/yandex-sysmon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yandex-sysmon/contextlog","description":"Context-based logger and formatter","fork":false,"url":"https://api.github.com/repos/yandex-sysmon/contextlog","forks_url":"https://api.github.com/repos/yandex-sysmon/contextlog/forks","keys_url":"https://api.github.com/repos/yandex-sysmon/contextlog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yandex-sysmon/contextlog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yandex-sysmon/contextlog/teams","hooks_url":"https://api.github.com/repos/yandex-sysmon/contextlog/hooks","issue_events_url":"https://api.github.com/repos/yandex-sysmon/contextlog/issues/events{/number}","events_url":"https://api.github.com/repos/yandex-sysmon/contextlog/events","assignees_url":"https://api.github.com/repos/yandex-sysmon/contextlog/assignees{/user}","branches_url":"https://api.github.com/repos/yandex-sysmon/contextlog/branches{/branch}","tags_url":"https://api.github.com/repos/yandex-sysmon/contextlog/tags","blobs_url":"https://api.github.com/repos/yandex-sysmon/contextlog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yandex-sysmon/contextlog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yandex-sysmon/contextlog/git/refs{/sha}","trees_url":"https://api.github.com/repos/yandex-sysmon/contextlog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yandex-sysmon/contextlog/statuses/{sha}","languages_url":"https://api.github.com/repos/yandex-sysmon/contextlog/languages","stargazers_url":"https://api.github.com/repos/yandex-sysmon/contextlog/stargazers","contributors_url":"https://api.github.com/repos/yandex-sysmon/contextlog/contributors","subscribers_url":"https://api.github.com/repos/yandex-sysmon/contextlog/subscribers","subscription_url":"https://api.github.com/repos/yandex-sysmon/contextlog/subscription","commits_url":"https://api.github.com/repos/yandex-sysmon/contextlog/commits{/sha}","git_commits_url":"https://api.github.com/repos/yandex-sysmon/contextlog/git/commits{/sha}","comments_url":"https://api.github.com/repos/yandex-sysmon/contextlog/comments{/number}","issue_comment_url":"https://api.github.com/repos/yandex-sysmon/contextlog/issues/comments/{number}","contents_url":"https://api.github.com/repos/yandex-sysmon/contextlog/contents/{+path}","compare_url":"https://api.github.com/repos/yandex-sysmon/contextlog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yandex-sysmon/contextlog/merges","archive_url":"https://api.github.com/repos/yandex-sysmon/contextlog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yandex-sysmon/contextlog/downloads","issues_url":"https://api.github.com/repos/yandex-sysmon/contextlog/issues{/number}","pulls_url":"https://api.github.com/repos/yandex-sysmon/contextlog/pulls{/number}","milestones_url":"https://api.github.com/repos/yandex-sysmon/contextlog/milestones{/number}","notifications_url":"https://api.github.com/repos/yandex-sysmon/contextlog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yandex-sysmon/contextlog/labels{/name}","releases_url":"https://api.github.com/repos/yandex-sysmon/contextlog/releases{/id}","created_at":"2014-07-24T14:33:58Z","updated_at":"2014-07-24T14:33:58Z","pushed_at":"2014-07-24T14:35:10Z","git_url":"git://github.com/yandex-sysmon/contextlog.git","ssh_url":"git@github.com:yandex-sysmon/contextlog.git","clone_url":"https://github.com/yandex-sysmon/contextlog.git","svn_url":"https://github.com/yandex-sysmon/contextlog","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yandex-sysmon/contextlog/pulls/1"},"html":{"href":"https://github.com/yandex-sysmon/contextlog/pull/1"},"issue":{"href":"https://api.github.com/repos/yandex-sysmon/contextlog/issues/1"},"comments":{"href":"https://api.github.com/repos/yandex-sysmon/contextlog/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/yandex-sysmon/contextlog/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/yandex-sysmon/contextlog/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/yandex-sysmon/contextlog/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/yandex-sysmon/contextlog/statuses/2da2e369769badd5c2357ff061165f4f25434320"}}}}