{"action":"created","comment":{"url":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls/comments/189900400","pull_request_review_id":122167938,"id":189900400,"diff_hunk":"@@ -0,0 +1,63 @@\n+#!/usr/bin/env python\n+# -*- coding: utf-8 -*-\n+\n+import unittest\n+\n+try:\n+    from tests.unittests_helper import CustomTestCase\n+except ImportError:\n+    from unittests_helper import CustomTestCase\n+\n+import tensorflow as tf\n+import tensorlayer as tl\n+\n+from logging import DEBUG\n+from logging import ERROR\n+from logging import FATAL\n+from logging import INFO","path":"tests/test_logging.py","position":17,"original_position":17,"commit_id":"dc4065f270b51bac027ad88d1a0f2713bb5721a1","original_commit_id":"dc4065f270b51bac027ad88d1a0f2713bb5721a1","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Unused INFO imported from logging](https://app.codacy.com/app/tensorlayer/tensorlayer/pullRequest?prid=1679572)","created_at":"2018-05-22T13:30:39Z","updated_at":"2018-05-22T13:30:39Z","html_url":"https://github.com/tensorlayer/tensorlayer/pull/645#discussion_r189900400","pull_request_url":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls/645","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls/comments/189900400"},"html":{"href":"https://github.com/tensorlayer/tensorlayer/pull/645#discussion_r189900400"},"pull_request":{"href":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls/645"}}},"pull_request":{"url":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls/645","id":189662421,"html_url":"https://github.com/tensorlayer/tensorlayer/pull/645","diff_url":"https://github.com/tensorlayer/tensorlayer/pull/645.diff","patch_url":"https://github.com/tensorlayer/tensorlayer/pull/645.patch","issue_url":"https://api.github.com/repos/tensorlayer/tensorlayer/issues/645","number":645,"state":"open","locked":false,"title":"TL logging API harmonization - Consistent with TF logging API","user":{"login":"DEKHTIARJonathan","id":10923599,"avatar_url":"https://avatars2.githubusercontent.com/u/10923599?v=4","gravatar_id":"","url":"https://api.github.com/users/DEKHTIARJonathan","html_url":"https://github.com/DEKHTIARJonathan","followers_url":"https://api.github.com/users/DEKHTIARJonathan/followers","following_url":"https://api.github.com/users/DEKHTIARJonathan/following{/other_user}","gists_url":"https://api.github.com/users/DEKHTIARJonathan/gists{/gist_id}","starred_url":"https://api.github.com/users/DEKHTIARJonathan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DEKHTIARJonathan/subscriptions","organizations_url":"https://api.github.com/users/DEKHTIARJonathan/orgs","repos_url":"https://api.github.com/users/DEKHTIARJonathan/repos","events_url":"https://api.github.com/users/DEKHTIARJonathan/events{/privacy}","received_events_url":"https://api.github.com/users/DEKHTIARJonathan/received_events","type":"User","site_admin":false},"body":"This PR aims to make logging:\r\n- consistent with TF logging API\r\n- thread-safe\r\n\r\nIt has been **highly** inspired by https://www.tensorflow.org/api_docs/python/tf/logging\r\n\r\nNow it is possible to do the followings:\r\n\r\n```python\r\nimport tensorlayer as tl\r\n\r\ntl.logging.set_verbosity(tl.logging.DEBUG)\r\ntl.logging.set_verbosity(tl.logging.INFO)\r\ntl.logging.set_verbosity(tl.logging.WARN)\r\ntl.logging.set_verbosity(tl.logging.ERROR)\r\ntl.logging.set_verbosity(tl.logging.FATAL)\r\n\r\ntl.logging.debug(\"This is a debug message\")\r\ntl.logging.error(\"This is an error message\")\r\ntl.logging.fatal(\"This is a fatal error message\")\r\ntl.logging.info(\"This is an information message\")\r\ntl.logging.warn(\"This is a warning message\")\r\n```\r\n","created_at":"2018-05-22T13:27:04Z","updated_at":"2018-05-22T13:30:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"404b177de8dd2f613163b450063849dad2b999e5","assignee":null,"assignees":[],"requested_reviewers":[{"login":"luomai","id":1136455,"avatar_url":"https://avatars3.githubusercontent.com/u/1136455?v=4","gravatar_id":"","url":"https://api.github.com/users/luomai","html_url":"https://github.com/luomai","followers_url":"https://api.github.com/users/luomai/followers","following_url":"https://api.github.com/users/luomai/following{/other_user}","gists_url":"https://api.github.com/users/luomai/gists{/gist_id}","starred_url":"https://api.github.com/users/luomai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luomai/subscriptions","organizations_url":"https://api.github.com/users/luomai/orgs","repos_url":"https://api.github.com/users/luomai/repos","events_url":"https://api.github.com/users/luomai/events{/privacy}","received_events_url":"https://api.github.com/users/luomai/received_events","type":"User","site_admin":false},{"login":"lgarithm","id":2044532,"avatar_url":"https://avatars1.githubusercontent.com/u/2044532?v=4","gravatar_id":"","url":"https://api.github.com/users/lgarithm","html_url":"https://github.com/lgarithm","followers_url":"https://api.github.com/users/lgarithm/followers","following_url":"https://api.github.com/users/lgarithm/following{/other_user}","gists_url":"https://api.github.com/users/lgarithm/gists{/gist_id}","starred_url":"https://api.github.com/users/lgarithm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgarithm/subscriptions","organizations_url":"https://api.github.com/users/lgarithm/orgs","repos_url":"https://api.github.com/users/lgarithm/repos","events_url":"https://api.github.com/users/lgarithm/events{/privacy}","received_events_url":"https://api.github.com/users/lgarithm/received_events","type":"User","site_admin":false},{"login":"zsdonghao","id":10713581,"avatar_url":"https://avatars0.githubusercontent.com/u/10713581?v=4","gravatar_id":"","url":"https://api.github.com/users/zsdonghao","html_url":"https://github.com/zsdonghao","followers_url":"https://api.github.com/users/zsdonghao/followers","following_url":"https://api.github.com/users/zsdonghao/following{/other_user}","gists_url":"https://api.github.com/users/zsdonghao/gists{/gist_id}","starred_url":"https://api.github.com/users/zsdonghao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsdonghao/subscriptions","organizations_url":"https://api.github.com/users/zsdonghao/orgs","repos_url":"https://api.github.com/users/zsdonghao/repos","events_url":"https://api.github.com/users/zsdonghao/events{/privacy}","received_events_url":"https://api.github.com/users/zsdonghao/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls/645/commits","review_comments_url":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls/645/comments","review_comment_url":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tensorlayer/tensorlayer/issues/645/comments","statuses_url":"https://api.github.com/repos/tensorlayer/tensorlayer/statuses/dc4065f270b51bac027ad88d1a0f2713bb5721a1","head":{"label":"tensorlayer:logging_api_harmonization","ref":"logging_api_harmonization","sha":"dc4065f270b51bac027ad88d1a0f2713bb5721a1","user":{"login":"tensorlayer","id":32261543,"avatar_url":"https://avatars1.githubusercontent.com/u/32261543?v=4","gravatar_id":"","url":"https://api.github.com/users/tensorlayer","html_url":"https://github.com/tensorlayer","followers_url":"https://api.github.com/users/tensorlayer/followers","following_url":"https://api.github.com/users/tensorlayer/following{/other_user}","gists_url":"https://api.github.com/users/tensorlayer/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorlayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorlayer/subscriptions","organizations_url":"https://api.github.com/users/tensorlayer/orgs","repos_url":"https://api.github.com/users/tensorlayer/repos","events_url":"https://api.github.com/users/tensorlayer/events{/privacy}","received_events_url":"https://api.github.com/users/tensorlayer/received_events","type":"Organization","site_admin":false},"repo":{"id":60626727,"name":"tensorlayer","full_name":"tensorlayer/tensorlayer","owner":{"login":"tensorlayer","id":32261543,"avatar_url":"https://avatars1.githubusercontent.com/u/32261543?v=4","gravatar_id":"","url":"https://api.github.com/users/tensorlayer","html_url":"https://github.com/tensorlayer","followers_url":"https://api.github.com/users/tensorlayer/followers","following_url":"https://api.github.com/users/tensorlayer/following{/other_user}","gists_url":"https://api.github.com/users/tensorlayer/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorlayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorlayer/subscriptions","organizations_url":"https://api.github.com/users/tensorlayer/orgs","repos_url":"https://api.github.com/users/tensorlayer/repos","events_url":"https://api.github.com/users/tensorlayer/events{/privacy}","received_events_url":"https://api.github.com/users/tensorlayer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tensorlayer/tensorlayer","description":"TensorLayer: A Deep Learning and Reinforcement Learning Library for Researchers and Engineers.","fork":false,"url":"https://api.github.com/repos/tensorlayer/tensorlayer","forks_url":"https://api.github.com/repos/tensorlayer/tensorlayer/forks","keys_url":"https://api.github.com/repos/tensorlayer/tensorlayer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tensorlayer/tensorlayer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tensorlayer/tensorlayer/teams","hooks_url":"https://api.github.com/repos/tensorlayer/tensorlayer/hooks","issue_events_url":"https://api.github.com/repos/tensorlayer/tensorlayer/issues/events{/number}","events_url":"https://api.github.com/repos/tensorlayer/tensorlayer/events","assignees_url":"https://api.github.com/repos/tensorlayer/tensorlayer/assignees{/user}","branches_url":"https://api.github.com/repos/tensorlayer/tensorlayer/branches{/branch}","tags_url":"https://api.github.com/repos/tensorlayer/tensorlayer/tags","blobs_url":"https://api.github.com/repos/tensorlayer/tensorlayer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tensorlayer/tensorlayer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tensorlayer/tensorlayer/git/refs{/sha}","trees_url":"https://api.github.com/repos/tensorlayer/tensorlayer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tensorlayer/tensorlayer/statuses/{sha}","languages_url":"https://api.github.com/repos/tensorlayer/tensorlayer/languages","stargazers_url":"https://api.github.com/repos/tensorlayer/tensorlayer/stargazers","contributors_url":"https://api.github.com/repos/tensorlayer/tensorlayer/contributors","subscribers_url":"https://api.github.com/repos/tensorlayer/tensorlayer/subscribers","subscription_url":"https://api.github.com/repos/tensorlayer/tensorlayer/subscription","commits_url":"https://api.github.com/repos/tensorlayer/tensorlayer/commits{/sha}","git_commits_url":"https://api.github.com/repos/tensorlayer/tensorlayer/git/commits{/sha}","comments_url":"https://api.github.com/repos/tensorlayer/tensorlayer/comments{/number}","issue_comment_url":"https://api.github.com/repos/tensorlayer/tensorlayer/issues/comments{/number}","contents_url":"https://api.github.com/repos/tensorlayer/tensorlayer/contents/{+path}","compare_url":"https://api.github.com/repos/tensorlayer/tensorlayer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tensorlayer/tensorlayer/merges","archive_url":"https://api.github.com/repos/tensorlayer/tensorlayer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tensorlayer/tensorlayer/downloads","issues_url":"https://api.github.com/repos/tensorlayer/tensorlayer/issues{/number}","pulls_url":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls{/number}","milestones_url":"https://api.github.com/repos/tensorlayer/tensorlayer/milestones{/number}","notifications_url":"https://api.github.com/repos/tensorlayer/tensorlayer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tensorlayer/tensorlayer/labels{/name}","releases_url":"https://api.github.com/repos/tensorlayer/tensorlayer/releases{/id}","deployments_url":"https://api.github.com/repos/tensorlayer/tensorlayer/deployments","created_at":"2016-06-07T15:55:16Z","updated_at":"2018-05-22T13:23:06Z","pushed_at":"2018-05-22T13:27:05Z","git_url":"git://github.com/tensorlayer/tensorlayer.git","ssh_url":"git@github.com:tensorlayer/tensorlayer.git","clone_url":"https://github.com/tensorlayer/tensorlayer.git","svn_url":"https://github.com/tensorlayer/tensorlayer","homepage":"http://tensorlayer.readthedocs.io","size":48083,"stargazers_count":3816,"watchers_count":3816,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":946,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":946,"open_issues":39,"watchers":3816,"default_branch":"master"}},"base":{"label":"tensorlayer:master","ref":"master","sha":"96a8adb4006aca38df6c0931bd2440c2d3438939","user":{"login":"tensorlayer","id":32261543,"avatar_url":"https://avatars1.githubusercontent.com/u/32261543?v=4","gravatar_id":"","url":"https://api.github.com/users/tensorlayer","html_url":"https://github.com/tensorlayer","followers_url":"https://api.github.com/users/tensorlayer/followers","following_url":"https://api.github.com/users/tensorlayer/following{/other_user}","gists_url":"https://api.github.com/users/tensorlayer/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorlayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorlayer/subscriptions","organizations_url":"https://api.github.com/users/tensorlayer/orgs","repos_url":"https://api.github.com/users/tensorlayer/repos","events_url":"https://api.github.com/users/tensorlayer/events{/privacy}","received_events_url":"https://api.github.com/users/tensorlayer/received_events","type":"Organization","site_admin":false},"repo":{"id":60626727,"name":"tensorlayer","full_name":"tensorlayer/tensorlayer","owner":{"login":"tensorlayer","id":32261543,"avatar_url":"https://avatars1.githubusercontent.com/u/32261543?v=4","gravatar_id":"","url":"https://api.github.com/users/tensorlayer","html_url":"https://github.com/tensorlayer","followers_url":"https://api.github.com/users/tensorlayer/followers","following_url":"https://api.github.com/users/tensorlayer/following{/other_user}","gists_url":"https://api.github.com/users/tensorlayer/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorlayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorlayer/subscriptions","organizations_url":"https://api.github.com/users/tensorlayer/orgs","repos_url":"https://api.github.com/users/tensorlayer/repos","events_url":"https://api.github.com/users/tensorlayer/events{/privacy}","received_events_url":"https://api.github.com/users/tensorlayer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tensorlayer/tensorlayer","description":"TensorLayer: A Deep Learning and Reinforcement Learning Library for Researchers and Engineers.","fork":false,"url":"https://api.github.com/repos/tensorlayer/tensorlayer","forks_url":"https://api.github.com/repos/tensorlayer/tensorlayer/forks","keys_url":"https://api.github.com/repos/tensorlayer/tensorlayer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tensorlayer/tensorlayer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tensorlayer/tensorlayer/teams","hooks_url":"https://api.github.com/repos/tensorlayer/tensorlayer/hooks","issue_events_url":"https://api.github.com/repos/tensorlayer/tensorlayer/issues/events{/number}","events_url":"https://api.github.com/repos/tensorlayer/tensorlayer/events","assignees_url":"https://api.github.com/repos/tensorlayer/tensorlayer/assignees{/user}","branches_url":"https://api.github.com/repos/tensorlayer/tensorlayer/branches{/branch}","tags_url":"https://api.github.com/repos/tensorlayer/tensorlayer/tags","blobs_url":"https://api.github.com/repos/tensorlayer/tensorlayer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tensorlayer/tensorlayer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tensorlayer/tensorlayer/git/refs{/sha}","trees_url":"https://api.github.com/repos/tensorlayer/tensorlayer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tensorlayer/tensorlayer/statuses/{sha}","languages_url":"https://api.github.com/repos/tensorlayer/tensorlayer/languages","stargazers_url":"https://api.github.com/repos/tensorlayer/tensorlayer/stargazers","contributors_url":"https://api.github.com/repos/tensorlayer/tensorlayer/contributors","subscribers_url":"https://api.github.com/repos/tensorlayer/tensorlayer/subscribers","subscription_url":"https://api.github.com/repos/tensorlayer/tensorlayer/subscription","commits_url":"https://api.github.com/repos/tensorlayer/tensorlayer/commits{/sha}","git_commits_url":"https://api.github.com/repos/tensorlayer/tensorlayer/git/commits{/sha}","comments_url":"https://api.github.com/repos/tensorlayer/tensorlayer/comments{/number}","issue_comment_url":"https://api.github.com/repos/tensorlayer/tensorlayer/issues/comments{/number}","contents_url":"https://api.github.com/repos/tensorlayer/tensorlayer/contents/{+path}","compare_url":"https://api.github.com/repos/tensorlayer/tensorlayer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tensorlayer/tensorlayer/merges","archive_url":"https://api.github.com/repos/tensorlayer/tensorlayer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tensorlayer/tensorlayer/downloads","issues_url":"https://api.github.com/repos/tensorlayer/tensorlayer/issues{/number}","pulls_url":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls{/number}","milestones_url":"https://api.github.com/repos/tensorlayer/tensorlayer/milestones{/number}","notifications_url":"https://api.github.com/repos/tensorlayer/tensorlayer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tensorlayer/tensorlayer/labels{/name}","releases_url":"https://api.github.com/repos/tensorlayer/tensorlayer/releases{/id}","deployments_url":"https://api.github.com/repos/tensorlayer/tensorlayer/deployments","created_at":"2016-06-07T15:55:16Z","updated_at":"2018-05-22T13:23:06Z","pushed_at":"2018-05-22T13:27:05Z","git_url":"git://github.com/tensorlayer/tensorlayer.git","ssh_url":"git@github.com:tensorlayer/tensorlayer.git","clone_url":"https://github.com/tensorlayer/tensorlayer.git","svn_url":"https://github.com/tensorlayer/tensorlayer","homepage":"http://tensorlayer.readthedocs.io","size":48083,"stargazers_count":3816,"watchers_count":3816,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":946,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":946,"open_issues":39,"watchers":3816,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls/645"},"html":{"href":"https://github.com/tensorlayer/tensorlayer/pull/645"},"issue":{"href":"https://api.github.com/repos/tensorlayer/tensorlayer/issues/645"},"comments":{"href":"https://api.github.com/repos/tensorlayer/tensorlayer/issues/645/comments"},"review_comments":{"href":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls/645/comments"},"review_comment":{"href":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tensorlayer/tensorlayer/pulls/645/commits"},"statuses":{"href":"https://api.github.com/repos/tensorlayer/tensorlayer/statuses/dc4065f270b51bac027ad88d1a0f2713bb5721a1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"codacy-bot"}}