{"action":"created","comment":{"url":"https://api.github.com/repos/Kinto/kinto/pulls/comments/64245387","id":64245387,"diff_hunk":"@@ -10,6 +10,19 @@\n logger = structlog.get_logger()\n \n \n+def reset_logger():\n+    \"\"\"Hack to work around https://github.com/hynek/structlog/issues/71.\n+\n+    This clears a magic field in the logger so that it will regenerate\n+    the right kind of logger on its next use.\n+\n+    Do this when you call structlog.configure(). Otherwise, some parts","path":"kinto/core/logs.py","position":10,"original_position":10,"commit_id":"1df754fa7355029f0b4ecb130f6619713ae0351e","original_commit_id":"1df754fa7355029f0b4ecb130f6619713ae0351e","user":{"login":"tarekziade","id":250019,"avatar_url":"https://avatars.githubusercontent.com/u/250019?v=3","gravatar_id":"","url":"https://api.github.com/users/tarekziade","html_url":"https://github.com/tarekziade","followers_url":"https://api.github.com/users/tarekziade/followers","following_url":"https://api.github.com/users/tarekziade/following{/other_user}","gists_url":"https://api.github.com/users/tarekziade/gists{/gist_id}","starred_url":"https://api.github.com/users/tarekziade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarekziade/subscriptions","organizations_url":"https://api.github.com/users/tarekziade/orgs","repos_url":"https://api.github.com/users/tarekziade/repos","events_url":"https://api.github.com/users/tarekziade/events{/privacy}","received_events_url":"https://api.github.com/users/tarekziade/received_events","type":"User","site_admin":false},"body":"Maybe we could provide our own `configure` function that includes `logger._logger = None` because I don't see a use case in kinto for using `reset_logger` besides configuring the logger.","created_at":"2016-05-23T16:08:02Z","updated_at":"2016-05-23T16:08:02Z","html_url":"https://github.com/Kinto/kinto/pull/633#discussion_r64245387","pull_request_url":"https://api.github.com/repos/Kinto/kinto/pulls/633","_links":{"self":{"href":"https://api.github.com/repos/Kinto/kinto/pulls/comments/64245387"},"html":{"href":"https://github.com/Kinto/kinto/pull/633#discussion_r64245387"},"pull_request":{"href":"https://api.github.com/repos/Kinto/kinto/pulls/633"}}},"pull_request":{"url":"https://api.github.com/repos/Kinto/kinto/pulls/633","id":71075264,"html_url":"https://github.com/Kinto/kinto/pull/633","diff_url":"https://github.com/Kinto/kinto/pull/633.diff","patch_url":"https://github.com/Kinto/kinto/pull/633.patch","issue_url":"https://api.github.com/repos/Kinto/kinto/issues/633","number":633,"state":"open","locked":false,"title":"Clear the logger when you configure it","user":{"login":"glasserc","id":17006,"avatar_url":"https://avatars.githubusercontent.com/u/17006?v=3","gravatar_id":"","url":"https://api.github.com/users/glasserc","html_url":"https://github.com/glasserc","followers_url":"https://api.github.com/users/glasserc/followers","following_url":"https://api.github.com/users/glasserc/following{/other_user}","gists_url":"https://api.github.com/users/glasserc/gists{/gist_id}","starred_url":"https://api.github.com/users/glasserc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glasserc/subscriptions","organizations_url":"https://api.github.com/users/glasserc/orgs","repos_url":"https://api.github.com/users/glasserc/repos","events_url":"https://api.github.com/users/glasserc/events{/privacy}","received_events_url":"https://api.github.com/users/glasserc/received_events","type":"User","site_admin":false},"body":"This is another ugly solution to #628 that relies on knowledge of the internals of the structlog library. The fundamental problem in https://github.com/hynek/structlog/issues/71 is that calling `configure` updates the `processors` variable globally, but the log proxy object has already set a `_logger` attribute based on a previous value of the `logger_class` parameter. If we clear that _logger variable, it will generate a new one on the next time around.","created_at":"2016-05-23T15:20:28Z","updated_at":"2016-05-23T16:08:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Kinto/kinto/pulls/633/commits","review_comments_url":"https://api.github.com/repos/Kinto/kinto/pulls/633/comments","review_comment_url":"https://api.github.com/repos/Kinto/kinto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Kinto/kinto/issues/633/comments","statuses_url":"https://api.github.com/repos/Kinto/kinto/statuses/1df754fa7355029f0b4ecb130f6619713ae0351e","head":{"label":"Kinto:use-logger-twice","ref":"use-logger-twice","sha":"1df754fa7355029f0b4ecb130f6619713ae0351e","user":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars.githubusercontent.com/u/13413813?v=3","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"repo":{"id":31315021,"name":"kinto","full_name":"Kinto/kinto","owner":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars.githubusercontent.com/u/13413813?v=3","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Kinto/kinto","description":"A minimalist JSON storage service with synchronisation and sharing abilities.","fork":false,"url":"https://api.github.com/repos/Kinto/kinto","forks_url":"https://api.github.com/repos/Kinto/kinto/forks","keys_url":"https://api.github.com/repos/Kinto/kinto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kinto/kinto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kinto/kinto/teams","hooks_url":"https://api.github.com/repos/Kinto/kinto/hooks","issue_events_url":"https://api.github.com/repos/Kinto/kinto/issues/events{/number}","events_url":"https://api.github.com/repos/Kinto/kinto/events","assignees_url":"https://api.github.com/repos/Kinto/kinto/assignees{/user}","branches_url":"https://api.github.com/repos/Kinto/kinto/branches{/branch}","tags_url":"https://api.github.com/repos/Kinto/kinto/tags","blobs_url":"https://api.github.com/repos/Kinto/kinto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kinto/kinto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kinto/kinto/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kinto/kinto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kinto/kinto/statuses/{sha}","languages_url":"https://api.github.com/repos/Kinto/kinto/languages","stargazers_url":"https://api.github.com/repos/Kinto/kinto/stargazers","contributors_url":"https://api.github.com/repos/Kinto/kinto/contributors","subscribers_url":"https://api.github.com/repos/Kinto/kinto/subscribers","subscription_url":"https://api.github.com/repos/Kinto/kinto/subscription","commits_url":"https://api.github.com/repos/Kinto/kinto/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kinto/kinto/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kinto/kinto/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kinto/kinto/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kinto/kinto/contents/{+path}","compare_url":"https://api.github.com/repos/Kinto/kinto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kinto/kinto/merges","archive_url":"https://api.github.com/repos/Kinto/kinto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kinto/kinto/downloads","issues_url":"https://api.github.com/repos/Kinto/kinto/issues{/number}","pulls_url":"https://api.github.com/repos/Kinto/kinto/pulls{/number}","milestones_url":"https://api.github.com/repos/Kinto/kinto/milestones{/number}","notifications_url":"https://api.github.com/repos/Kinto/kinto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kinto/kinto/labels{/name}","releases_url":"https://api.github.com/repos/Kinto/kinto/releases{/id}","deployments_url":"https://api.github.com/repos/Kinto/kinto/deployments","created_at":"2015-02-25T13:34:23Z","updated_at":"2016-05-21T01:00:28Z","pushed_at":"2016-05-23T15:34:05Z","git_url":"git://github.com/Kinto/kinto.git","ssh_url":"git@github.com:Kinto/kinto.git","clone_url":"https://github.com/Kinto/kinto.git","svn_url":"https://github.com/Kinto/kinto","homepage":"http://kinto.readthedocs.org/","size":11500,"stargazers_count":2753,"watchers_count":2753,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":142,"mirror_url":null,"open_issues_count":88,"forks":142,"open_issues":88,"watchers":2753,"default_branch":"master"}},"base":{"label":"Kinto:master","ref":"master","sha":"96a1f802c37c2dbf0e7250db01bb166a53e921d2","user":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars.githubusercontent.com/u/13413813?v=3","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"repo":{"id":31315021,"name":"kinto","full_name":"Kinto/kinto","owner":{"login":"Kinto","id":13413813,"avatar_url":"https://avatars.githubusercontent.com/u/13413813?v=3","gravatar_id":"","url":"https://api.github.com/users/Kinto","html_url":"https://github.com/Kinto","followers_url":"https://api.github.com/users/Kinto/followers","following_url":"https://api.github.com/users/Kinto/following{/other_user}","gists_url":"https://api.github.com/users/Kinto/gists{/gist_id}","starred_url":"https://api.github.com/users/Kinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kinto/subscriptions","organizations_url":"https://api.github.com/users/Kinto/orgs","repos_url":"https://api.github.com/users/Kinto/repos","events_url":"https://api.github.com/users/Kinto/events{/privacy}","received_events_url":"https://api.github.com/users/Kinto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Kinto/kinto","description":"A minimalist JSON storage service with synchronisation and sharing abilities.","fork":false,"url":"https://api.github.com/repos/Kinto/kinto","forks_url":"https://api.github.com/repos/Kinto/kinto/forks","keys_url":"https://api.github.com/repos/Kinto/kinto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kinto/kinto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kinto/kinto/teams","hooks_url":"https://api.github.com/repos/Kinto/kinto/hooks","issue_events_url":"https://api.github.com/repos/Kinto/kinto/issues/events{/number}","events_url":"https://api.github.com/repos/Kinto/kinto/events","assignees_url":"https://api.github.com/repos/Kinto/kinto/assignees{/user}","branches_url":"https://api.github.com/repos/Kinto/kinto/branches{/branch}","tags_url":"https://api.github.com/repos/Kinto/kinto/tags","blobs_url":"https://api.github.com/repos/Kinto/kinto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kinto/kinto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kinto/kinto/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kinto/kinto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kinto/kinto/statuses/{sha}","languages_url":"https://api.github.com/repos/Kinto/kinto/languages","stargazers_url":"https://api.github.com/repos/Kinto/kinto/stargazers","contributors_url":"https://api.github.com/repos/Kinto/kinto/contributors","subscribers_url":"https://api.github.com/repos/Kinto/kinto/subscribers","subscription_url":"https://api.github.com/repos/Kinto/kinto/subscription","commits_url":"https://api.github.com/repos/Kinto/kinto/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kinto/kinto/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kinto/kinto/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kinto/kinto/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kinto/kinto/contents/{+path}","compare_url":"https://api.github.com/repos/Kinto/kinto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kinto/kinto/merges","archive_url":"https://api.github.com/repos/Kinto/kinto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kinto/kinto/downloads","issues_url":"https://api.github.com/repos/Kinto/kinto/issues{/number}","pulls_url":"https://api.github.com/repos/Kinto/kinto/pulls{/number}","milestones_url":"https://api.github.com/repos/Kinto/kinto/milestones{/number}","notifications_url":"https://api.github.com/repos/Kinto/kinto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kinto/kinto/labels{/name}","releases_url":"https://api.github.com/repos/Kinto/kinto/releases{/id}","deployments_url":"https://api.github.com/repos/Kinto/kinto/deployments","created_at":"2015-02-25T13:34:23Z","updated_at":"2016-05-21T01:00:28Z","pushed_at":"2016-05-23T15:34:05Z","git_url":"git://github.com/Kinto/kinto.git","ssh_url":"git@github.com:Kinto/kinto.git","clone_url":"https://github.com/Kinto/kinto.git","svn_url":"https://github.com/Kinto/kinto","homepage":"http://kinto.readthedocs.org/","size":11500,"stargazers_count":2753,"watchers_count":2753,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":142,"mirror_url":null,"open_issues_count":88,"forks":142,"open_issues":88,"watchers":2753,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Kinto/kinto/pulls/633"},"html":{"href":"https://github.com/Kinto/kinto/pull/633"},"issue":{"href":"https://api.github.com/repos/Kinto/kinto/issues/633"},"comments":{"href":"https://api.github.com/repos/Kinto/kinto/issues/633/comments"},"review_comments":{"href":"https://api.github.com/repos/Kinto/kinto/pulls/633/comments"},"review_comment":{"href":"https://api.github.com/repos/Kinto/kinto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Kinto/kinto/pulls/633/commits"},"statuses":{"href":"https://api.github.com/repos/Kinto/kinto/statuses/1df754fa7355029f0b4ecb130f6619713ae0351e"}}}}
{"actor":{"display_login":"tarekziade"}}