{"action":"created","comment":{"url":"https://api.github.com/repos/mitsuhiko/click/pulls/comments/23838044","id":23838044,"diff_hunk":"@@ -0,0 +1,192 @@\n+import sys\n+\n+import re\n+import click\n+import logging\n+\n+log_stream = None\n+\n+\n+def tool_resetlog():\n+\n+    global log_stream","path":"tests/test_simplelog.py","position":12,"original_position":12,"commit_id":"d1645f1942adaf1d834dc11fb4d0e27d06695b29","original_commit_id":"d1645f1942adaf1d834dc11fb4d0e27d06695b29","user":{"login":"dploeger","id":203453,"avatar_url":"https://avatars.githubusercontent.com/u/203453?v=3","gravatar_id":"","url":"https://api.github.com/users/dploeger","html_url":"https://github.com/dploeger","followers_url":"https://api.github.com/users/dploeger/followers","following_url":"https://api.github.com/users/dploeger/following{/other_user}","gists_url":"https://api.github.com/users/dploeger/gists{/gist_id}","starred_url":"https://api.github.com/users/dploeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dploeger/subscriptions","organizations_url":"https://api.github.com/users/dploeger/orgs","repos_url":"https://api.github.com/users/dploeger/repos","events_url":"https://api.github.com/users/dploeger/events{/privacy}","received_events_url":"https://api.github.com/users/dploeger/received_events","type":"User","site_admin":false},"body":"Actually, I configured my IntelliJ Code Style accordingly. ;-)","created_at":"2015-01-30T11:59:13Z","updated_at":"2015-01-30T11:59:13Z","html_url":"https://github.com/mitsuhiko/click/pull/278#discussion_r23838044","pull_request_url":"https://api.github.com/repos/mitsuhiko/click/pulls/278","_links":{"self":{"href":"https://api.github.com/repos/mitsuhiko/click/pulls/comments/23838044"},"html":{"href":"https://github.com/mitsuhiko/click/pull/278#discussion_r23838044"},"pull_request":{"href":"https://api.github.com/repos/mitsuhiko/click/pulls/278"}}},"pull_request":{"url":"https://api.github.com/repos/mitsuhiko/click/pulls/278","id":27108760,"html_url":"https://github.com/mitsuhiko/click/pull/278","diff_url":"https://github.com/mitsuhiko/click/pull/278.diff","patch_url":"https://github.com/mitsuhiko/click/pull/278.patch","issue_url":"https://api.github.com/repos/mitsuhiko/click/issues/278","number":278,"state":"open","locked":false,"title":"Simplelog-feature","user":{"login":"dploeger","id":203453,"avatar_url":"https://avatars.githubusercontent.com/u/203453?v=3","gravatar_id":"","url":"https://api.github.com/users/dploeger","html_url":"https://github.com/dploeger","followers_url":"https://api.github.com/users/dploeger/followers","following_url":"https://api.github.com/users/dploeger/following{/other_user}","gists_url":"https://api.github.com/users/dploeger/gists{/gist_id}","starred_url":"https://api.github.com/users/dploeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dploeger/subscriptions","organizations_url":"https://api.github.com/users/dploeger/orgs","repos_url":"https://api.github.com/users/dploeger/repos","events_url":"https://api.github.com/users/dploeger/events{/privacy}","received_events_url":"https://api.github.com/users/dploeger/received_events","type":"User","site_admin":false},"body":"This is what I meant in #277 :)\r\n\r\nNow you can add @click.simplelog() to a command to add logging behaviour to it. Afterwards you can simply call logging.debug for debugging messages and they will only show up, if the user specified the --debug/-d-switch.\r\n\r\nIf you like it, I can additionally add the relevant documentation.","created_at":"2015-01-09T15:58:50Z","updated_at":"2015-01-30T11:59:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a564d650d7a2b34460858ae3ee0e4b2ca35f8854","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mitsuhiko/click/pulls/278/commits","review_comments_url":"https://api.github.com/repos/mitsuhiko/click/pulls/278/comments","review_comment_url":"https://api.github.com/repos/mitsuhiko/click/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mitsuhiko/click/issues/278/comments","statuses_url":"https://api.github.com/repos/mitsuhiko/click/statuses/d1645f1942adaf1d834dc11fb4d0e27d06695b29","head":{"label":"dploeger:master","ref":"master","sha":"d1645f1942adaf1d834dc11fb4d0e27d06695b29","user":{"login":"dploeger","id":203453,"avatar_url":"https://avatars.githubusercontent.com/u/203453?v=3","gravatar_id":"","url":"https://api.github.com/users/dploeger","html_url":"https://github.com/dploeger","followers_url":"https://api.github.com/users/dploeger/followers","following_url":"https://api.github.com/users/dploeger/following{/other_user}","gists_url":"https://api.github.com/users/dploeger/gists{/gist_id}","starred_url":"https://api.github.com/users/dploeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dploeger/subscriptions","organizations_url":"https://api.github.com/users/dploeger/orgs","repos_url":"https://api.github.com/users/dploeger/repos","events_url":"https://api.github.com/users/dploeger/events{/privacy}","received_events_url":"https://api.github.com/users/dploeger/received_events","type":"User","site_admin":false},"repo":{"id":29016437,"name":"click","full_name":"dploeger/click","owner":{"login":"dploeger","id":203453,"avatar_url":"https://avatars.githubusercontent.com/u/203453?v=3","gravatar_id":"","url":"https://api.github.com/users/dploeger","html_url":"https://github.com/dploeger","followers_url":"https://api.github.com/users/dploeger/followers","following_url":"https://api.github.com/users/dploeger/following{/other_user}","gists_url":"https://api.github.com/users/dploeger/gists{/gist_id}","starred_url":"https://api.github.com/users/dploeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dploeger/subscriptions","organizations_url":"https://api.github.com/users/dploeger/orgs","repos_url":"https://api.github.com/users/dploeger/repos","events_url":"https://api.github.com/users/dploeger/events{/privacy}","received_events_url":"https://api.github.com/users/dploeger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dploeger/click","description":"Python composable command line utility","fork":true,"url":"https://api.github.com/repos/dploeger/click","forks_url":"https://api.github.com/repos/dploeger/click/forks","keys_url":"https://api.github.com/repos/dploeger/click/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dploeger/click/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dploeger/click/teams","hooks_url":"https://api.github.com/repos/dploeger/click/hooks","issue_events_url":"https://api.github.com/repos/dploeger/click/issues/events{/number}","events_url":"https://api.github.com/repos/dploeger/click/events","assignees_url":"https://api.github.com/repos/dploeger/click/assignees{/user}","branches_url":"https://api.github.com/repos/dploeger/click/branches{/branch}","tags_url":"https://api.github.com/repos/dploeger/click/tags","blobs_url":"https://api.github.com/repos/dploeger/click/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dploeger/click/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dploeger/click/git/refs{/sha}","trees_url":"https://api.github.com/repos/dploeger/click/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dploeger/click/statuses/{sha}","languages_url":"https://api.github.com/repos/dploeger/click/languages","stargazers_url":"https://api.github.com/repos/dploeger/click/stargazers","contributors_url":"https://api.github.com/repos/dploeger/click/contributors","subscribers_url":"https://api.github.com/repos/dploeger/click/subscribers","subscription_url":"https://api.github.com/repos/dploeger/click/subscription","commits_url":"https://api.github.com/repos/dploeger/click/commits{/sha}","git_commits_url":"https://api.github.com/repos/dploeger/click/git/commits{/sha}","comments_url":"https://api.github.com/repos/dploeger/click/comments{/number}","issue_comment_url":"https://api.github.com/repos/dploeger/click/issues/comments/{number}","contents_url":"https://api.github.com/repos/dploeger/click/contents/{+path}","compare_url":"https://api.github.com/repos/dploeger/click/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dploeger/click/merges","archive_url":"https://api.github.com/repos/dploeger/click/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dploeger/click/downloads","issues_url":"https://api.github.com/repos/dploeger/click/issues{/number}","pulls_url":"https://api.github.com/repos/dploeger/click/pulls{/number}","milestones_url":"https://api.github.com/repos/dploeger/click/milestones{/number}","notifications_url":"https://api.github.com/repos/dploeger/click/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dploeger/click/labels{/name}","releases_url":"https://api.github.com/repos/dploeger/click/releases{/id}","created_at":"2015-01-09T12:56:18Z","updated_at":"2015-01-12T11:43:00Z","pushed_at":"2015-01-12T11:43:00Z","git_url":"git://github.com/dploeger/click.git","ssh_url":"git@github.com:dploeger/click.git","clone_url":"https://github.com/dploeger/click.git","svn_url":"https://github.com/dploeger/click","homepage":"http://click.pocoo.org/","size":1068,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mitsuhiko:master","ref":"master","sha":"308cc08a711f1ec372fd7fa5acca8e8a1a04ee70","user":{"login":"mitsuhiko","id":7396,"avatar_url":"https://avatars.githubusercontent.com/u/7396?v=3","gravatar_id":"","url":"https://api.github.com/users/mitsuhiko","html_url":"https://github.com/mitsuhiko","followers_url":"https://api.github.com/users/mitsuhiko/followers","following_url":"https://api.github.com/users/mitsuhiko/following{/other_user}","gists_url":"https://api.github.com/users/mitsuhiko/gists{/gist_id}","starred_url":"https://api.github.com/users/mitsuhiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitsuhiko/subscriptions","organizations_url":"https://api.github.com/users/mitsuhiko/orgs","repos_url":"https://api.github.com/users/mitsuhiko/repos","events_url":"https://api.github.com/users/mitsuhiko/events{/privacy}","received_events_url":"https://api.github.com/users/mitsuhiko/received_events","type":"User","site_admin":false},"repo":{"id":19103692,"name":"click","full_name":"mitsuhiko/click","owner":{"login":"mitsuhiko","id":7396,"avatar_url":"https://avatars.githubusercontent.com/u/7396?v=3","gravatar_id":"","url":"https://api.github.com/users/mitsuhiko","html_url":"https://github.com/mitsuhiko","followers_url":"https://api.github.com/users/mitsuhiko/followers","following_url":"https://api.github.com/users/mitsuhiko/following{/other_user}","gists_url":"https://api.github.com/users/mitsuhiko/gists{/gist_id}","starred_url":"https://api.github.com/users/mitsuhiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitsuhiko/subscriptions","organizations_url":"https://api.github.com/users/mitsuhiko/orgs","repos_url":"https://api.github.com/users/mitsuhiko/repos","events_url":"https://api.github.com/users/mitsuhiko/events{/privacy}","received_events_url":"https://api.github.com/users/mitsuhiko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mitsuhiko/click","description":"Python composable command line utility","fork":false,"url":"https://api.github.com/repos/mitsuhiko/click","forks_url":"https://api.github.com/repos/mitsuhiko/click/forks","keys_url":"https://api.github.com/repos/mitsuhiko/click/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitsuhiko/click/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitsuhiko/click/teams","hooks_url":"https://api.github.com/repos/mitsuhiko/click/hooks","issue_events_url":"https://api.github.com/repos/mitsuhiko/click/issues/events{/number}","events_url":"https://api.github.com/repos/mitsuhiko/click/events","assignees_url":"https://api.github.com/repos/mitsuhiko/click/assignees{/user}","branches_url":"https://api.github.com/repos/mitsuhiko/click/branches{/branch}","tags_url":"https://api.github.com/repos/mitsuhiko/click/tags","blobs_url":"https://api.github.com/repos/mitsuhiko/click/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitsuhiko/click/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitsuhiko/click/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitsuhiko/click/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitsuhiko/click/statuses/{sha}","languages_url":"https://api.github.com/repos/mitsuhiko/click/languages","stargazers_url":"https://api.github.com/repos/mitsuhiko/click/stargazers","contributors_url":"https://api.github.com/repos/mitsuhiko/click/contributors","subscribers_url":"https://api.github.com/repos/mitsuhiko/click/subscribers","subscription_url":"https://api.github.com/repos/mitsuhiko/click/subscription","commits_url":"https://api.github.com/repos/mitsuhiko/click/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitsuhiko/click/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitsuhiko/click/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitsuhiko/click/issues/comments/{number}","contents_url":"https://api.github.com/repos/mitsuhiko/click/contents/{+path}","compare_url":"https://api.github.com/repos/mitsuhiko/click/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitsuhiko/click/merges","archive_url":"https://api.github.com/repos/mitsuhiko/click/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitsuhiko/click/downloads","issues_url":"https://api.github.com/repos/mitsuhiko/click/issues{/number}","pulls_url":"https://api.github.com/repos/mitsuhiko/click/pulls{/number}","milestones_url":"https://api.github.com/repos/mitsuhiko/click/milestones{/number}","notifications_url":"https://api.github.com/repos/mitsuhiko/click/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitsuhiko/click/labels{/name}","releases_url":"https://api.github.com/repos/mitsuhiko/click/releases{/id}","created_at":"2014-04-24T09:52:19Z","updated_at":"2015-01-29T18:43:12Z","pushed_at":"2015-01-29T14:42:40Z","git_url":"git://github.com/mitsuhiko/click.git","ssh_url":"git@github.com:mitsuhiko/click.git","clone_url":"https://github.com/mitsuhiko/click.git","svn_url":"https://github.com/mitsuhiko/click","homepage":"http://click.pocoo.org/","size":5380,"stargazers_count":1949,"watchers_count":1949,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":134,"mirror_url":null,"open_issues_count":43,"forks":134,"open_issues":43,"watchers":1949,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mitsuhiko/click/pulls/278"},"html":{"href":"https://github.com/mitsuhiko/click/pull/278"},"issue":{"href":"https://api.github.com/repos/mitsuhiko/click/issues/278"},"comments":{"href":"https://api.github.com/repos/mitsuhiko/click/issues/278/comments"},"review_comments":{"href":"https://api.github.com/repos/mitsuhiko/click/pulls/278/comments"},"review_comment":{"href":"https://api.github.com/repos/mitsuhiko/click/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mitsuhiko/click/pulls/278/commits"},"statuses":{"href":"https://api.github.com/repos/mitsuhiko/click/statuses/d1645f1942adaf1d834dc11fb4d0e27d06695b29"}}}}