{"action":"created","comment":{"url":"https://api.github.com/repos/streamlink/streamlink/pulls/comments/191930989","pull_request_review_id":124603059,"id":191930989,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MTkzMDk4OQ==","diff_hunk":"@@ -886,12 +885,12 @@ def setup_plugin_options(session, plugin):\n def check_root():\n     if hasattr(os, \"getuid\"):\n         if os.geteuid() == 0:\n-            console.logger.info(\"streamlink is running as root! Be careful!\")\n+            log.info(\"streamlink is running as root! Be careful!\")\n \n \n def log_current_versions():\n     \"\"\"Show current installed versions\"\"\"\n-    if args.loglevel == \"debug\":\n+    if logger.root.isEnabledFor(logging.DEBUG):","path":"src/streamlink_cli/main.py","position":324,"original_position":324,"commit_id":"57b5740c0a811dfab25f99988efb508d468e4e4c","original_commit_id":"57b5740c0a811dfab25f99988efb508d468e4e4c","user":{"login":"beardypig","id":16033421,"node_id":"MDQ6VXNlcjE2MDMzNDIx","avatar_url":"https://avatars2.githubusercontent.com/u/16033421?v=4","gravatar_id":"","url":"https://api.github.com/users/beardypig","html_url":"https://github.com/beardypig","followers_url":"https://api.github.com/users/beardypig/followers","following_url":"https://api.github.com/users/beardypig/following{/other_user}","gists_url":"https://api.github.com/users/beardypig/gists{/gist_id}","starred_url":"https://api.github.com/users/beardypig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beardypig/subscriptions","organizations_url":"https://api.github.com/users/beardypig/orgs","repos_url":"https://api.github.com/users/beardypig/repos","events_url":"https://api.github.com/users/beardypig/events{/privacy}","received_events_url":"https://api.github.com/users/beardypig/received_events","type":"User","site_admin":false},"body":"Opened #1715 which resolves it for me, can you take a look? ","created_at":"2018-05-30T21:36:35Z","updated_at":"2018-05-30T21:36:36Z","html_url":"https://github.com/streamlink/streamlink/pull/1690#discussion_r191930989","pull_request_url":"https://api.github.com/repos/streamlink/streamlink/pulls/1690","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/streamlink/streamlink/pulls/comments/191930989"},"html":{"href":"https://github.com/streamlink/streamlink/pull/1690#discussion_r191930989"},"pull_request":{"href":"https://api.github.com/repos/streamlink/streamlink/pulls/1690"}},"in_reply_to_id":191924198},"pull_request":{"url":"https://api.github.com/repos/streamlink/streamlink/pulls/1690","id":190449797,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkwNDQ5Nzk3","html_url":"https://github.com/streamlink/streamlink/pull/1690","diff_url":"https://github.com/streamlink/streamlink/pull/1690.diff","patch_url":"https://github.com/streamlink/streamlink/pull/1690.patch","issue_url":"https://api.github.com/repos/streamlink/streamlink/issues/1690","number":1690,"state":"closed","locked":false,"title":"logging: refactor to use python logging module","user":{"login":"beardypig","id":16033421,"node_id":"MDQ6VXNlcjE2MDMzNDIx","avatar_url":"https://avatars2.githubusercontent.com/u/16033421?v=4","gravatar_id":"","url":"https://api.github.com/users/beardypig","html_url":"https://github.com/beardypig","followers_url":"https://api.github.com/users/beardypig/followers","following_url":"https://api.github.com/users/beardypig/following{/other_user}","gists_url":"https://api.github.com/users/beardypig/gists{/gist_id}","starred_url":"https://api.github.com/users/beardypig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beardypig/subscriptions","organizations_url":"https://api.github.com/users/beardypig/orgs","repos_url":"https://api.github.com/users/beardypig/repos","events_url":"https://api.github.com/users/beardypig/events{/privacy}","received_events_url":"https://api.github.com/users/beardypig/received_events","type":"User","site_admin":false},"body":"The logging output remains identical to before. The API has changed, instead of passing a Logger instance around, a module level `log` instance is used. This is the standard way to do logging in most Python applications and module. \r\n \r\n - [x] Replace old crufty logging with standard Python logging\r\n - [x] Add `trace` log level\r\n - [x] Add compatibility class for old Logger\r\n - [x] ~~Update plugins to use new logging~~ Too many plugins!!!\r\n\r\n`Session` still has a `logger` attribute, which passes the log messages to the standard logger. A `DeprecationWarning` is issued if this is done though. The `Logger` and `LoggerModule` classes have been reimplemented as a compatibility layer just incase.  \r\n\r\nThere are a number of advantages to doing this:\r\n  1. more Pythonic\r\n  2. easier to add logging message from utils and other methods without passing session or loggers around (this is my main motivation) \r\n  3. if required, log messages from other Python modules can be enabled\r\n  4. the log destination could be changed to (or duplicated to) other places, syslog for example\r\n  5. when other applications include streamlink they can get the streamlink logging message\r\n\r\nNote: I want to refactor the logging for the plugins too, but there are too many damn plugins - it's optional, developers can use either system as it ends up in the same place anyway. As a developer of plugins you would not notice any difference. \r\n\r\nFYI: I wanted this to add logging to the `MPD` class, with the current system it's not very easy and make very ugly code to log via `Session`. ","created_at":"2018-05-24T23:51:33Z","updated_at":"2018-05-30T21:36:36Z","closed_at":"2018-05-30T01:15:11Z","merged_at":"2018-05-30T01:15:11Z","merge_commit_sha":"60efe3bfd491ad13a249f8ba73bd818148545a6a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/streamlink/streamlink/pulls/1690/commits","review_comments_url":"https://api.github.com/repos/streamlink/streamlink/pulls/1690/comments","review_comment_url":"https://api.github.com/repos/streamlink/streamlink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/streamlink/streamlink/issues/1690/comments","statuses_url":"https://api.github.com/repos/streamlink/streamlink/statuses/57b5740c0a811dfab25f99988efb508d468e4e4c","head":{"label":"beardypig:logging-refactor","ref":"logging-refactor","sha":"57b5740c0a811dfab25f99988efb508d468e4e4c","user":{"login":"beardypig","id":16033421,"node_id":"MDQ6VXNlcjE2MDMzNDIx","avatar_url":"https://avatars2.githubusercontent.com/u/16033421?v=4","gravatar_id":"","url":"https://api.github.com/users/beardypig","html_url":"https://github.com/beardypig","followers_url":"https://api.github.com/users/beardypig/followers","following_url":"https://api.github.com/users/beardypig/following{/other_user}","gists_url":"https://api.github.com/users/beardypig/gists{/gist_id}","starred_url":"https://api.github.com/users/beardypig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beardypig/subscriptions","organizations_url":"https://api.github.com/users/beardypig/orgs","repos_url":"https://api.github.com/users/beardypig/repos","events_url":"https://api.github.com/users/beardypig/events{/privacy}","received_events_url":"https://api.github.com/users/beardypig/received_events","type":"User","site_admin":false},"repo":{"id":70149227,"node_id":"MDEwOlJlcG9zaXRvcnk3MDE0OTIyNw==","name":"streamlink","full_name":"beardypig/streamlink","owner":{"login":"beardypig","id":16033421,"node_id":"MDQ6VXNlcjE2MDMzNDIx","avatar_url":"https://avatars2.githubusercontent.com/u/16033421?v=4","gravatar_id":"","url":"https://api.github.com/users/beardypig","html_url":"https://github.com/beardypig","followers_url":"https://api.github.com/users/beardypig/followers","following_url":"https://api.github.com/users/beardypig/following{/other_user}","gists_url":"https://api.github.com/users/beardypig/gists{/gist_id}","starred_url":"https://api.github.com/users/beardypig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beardypig/subscriptions","organizations_url":"https://api.github.com/users/beardypig/orgs","repos_url":"https://api.github.com/users/beardypig/repos","events_url":"https://api.github.com/users/beardypig/events{/privacy}","received_events_url":"https://api.github.com/users/beardypig/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/beardypig/streamlink","description":"CLI for extracting streams from various websites to a video player of your choosing","fork":true,"url":"https://api.github.com/repos/beardypig/streamlink","forks_url":"https://api.github.com/repos/beardypig/streamlink/forks","keys_url":"https://api.github.com/repos/beardypig/streamlink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/beardypig/streamlink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/beardypig/streamlink/teams","hooks_url":"https://api.github.com/repos/beardypig/streamlink/hooks","issue_events_url":"https://api.github.com/repos/beardypig/streamlink/issues/events{/number}","events_url":"https://api.github.com/repos/beardypig/streamlink/events","assignees_url":"https://api.github.com/repos/beardypig/streamlink/assignees{/user}","branches_url":"https://api.github.com/repos/beardypig/streamlink/branches{/branch}","tags_url":"https://api.github.com/repos/beardypig/streamlink/tags","blobs_url":"https://api.github.com/repos/beardypig/streamlink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/beardypig/streamlink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/beardypig/streamlink/git/refs{/sha}","trees_url":"https://api.github.com/repos/beardypig/streamlink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/beardypig/streamlink/statuses/{sha}","languages_url":"https://api.github.com/repos/beardypig/streamlink/languages","stargazers_url":"https://api.github.com/repos/beardypig/streamlink/stargazers","contributors_url":"https://api.github.com/repos/beardypig/streamlink/contributors","subscribers_url":"https://api.github.com/repos/beardypig/streamlink/subscribers","subscription_url":"https://api.github.com/repos/beardypig/streamlink/subscription","commits_url":"https://api.github.com/repos/beardypig/streamlink/commits{/sha}","git_commits_url":"https://api.github.com/repos/beardypig/streamlink/git/commits{/sha}","comments_url":"https://api.github.com/repos/beardypig/streamlink/comments{/number}","issue_comment_url":"https://api.github.com/repos/beardypig/streamlink/issues/comments{/number}","contents_url":"https://api.github.com/repos/beardypig/streamlink/contents/{+path}","compare_url":"https://api.github.com/repos/beardypig/streamlink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/beardypig/streamlink/merges","archive_url":"https://api.github.com/repos/beardypig/streamlink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/beardypig/streamlink/downloads","issues_url":"https://api.github.com/repos/beardypig/streamlink/issues{/number}","pulls_url":"https://api.github.com/repos/beardypig/streamlink/pulls{/number}","milestones_url":"https://api.github.com/repos/beardypig/streamlink/milestones{/number}","notifications_url":"https://api.github.com/repos/beardypig/streamlink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/beardypig/streamlink/labels{/name}","releases_url":"https://api.github.com/repos/beardypig/streamlink/releases{/id}","deployments_url":"https://api.github.com/repos/beardypig/streamlink/deployments","created_at":"2016-10-06T11:52:09Z","updated_at":"2018-05-30T08:56:56Z","pushed_at":"2018-05-30T21:34:22Z","git_url":"git://github.com/beardypig/streamlink.git","ssh_url":"git@github.com:beardypig/streamlink.git","clone_url":"https://github.com/beardypig/streamlink.git","svn_url":"https://github.com/beardypig/streamlink","homepage":"https://streamlink.github.io/","size":62968,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":1,"open_issues":5,"watchers":3,"default_branch":"master"}},"base":{"label":"streamlink:master","ref":"master","sha":"757861d94eee4543087482e5646a3f5d17cc9404","user":{"login":"streamlink","id":22243823,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMjQzODIz","avatar_url":"https://avatars0.githubusercontent.com/u/22243823?v=4","gravatar_id":"","url":"https://api.github.com/users/streamlink","html_url":"https://github.com/streamlink","followers_url":"https://api.github.com/users/streamlink/followers","following_url":"https://api.github.com/users/streamlink/following{/other_user}","gists_url":"https://api.github.com/users/streamlink/gists{/gist_id}","starred_url":"https://api.github.com/users/streamlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/streamlink/subscriptions","organizations_url":"https://api.github.com/users/streamlink/orgs","repos_url":"https://api.github.com/users/streamlink/repos","events_url":"https://api.github.com/users/streamlink/events{/privacy}","received_events_url":"https://api.github.com/users/streamlink/received_events","type":"Organization","site_admin":false},"repo":{"id":68402336,"node_id":"MDEwOlJlcG9zaXRvcnk2ODQwMjMzNg==","name":"streamlink","full_name":"streamlink/streamlink","owner":{"login":"streamlink","id":22243823,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMjQzODIz","avatar_url":"https://avatars0.githubusercontent.com/u/22243823?v=4","gravatar_id":"","url":"https://api.github.com/users/streamlink","html_url":"https://github.com/streamlink","followers_url":"https://api.github.com/users/streamlink/followers","following_url":"https://api.github.com/users/streamlink/following{/other_user}","gists_url":"https://api.github.com/users/streamlink/gists{/gist_id}","starred_url":"https://api.github.com/users/streamlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/streamlink/subscriptions","organizations_url":"https://api.github.com/users/streamlink/orgs","repos_url":"https://api.github.com/users/streamlink/repos","events_url":"https://api.github.com/users/streamlink/events{/privacy}","received_events_url":"https://api.github.com/users/streamlink/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/streamlink/streamlink","description":"CLI for extracting streams from various websites to a video player of your choosing","fork":false,"url":"https://api.github.com/repos/streamlink/streamlink","forks_url":"https://api.github.com/repos/streamlink/streamlink/forks","keys_url":"https://api.github.com/repos/streamlink/streamlink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/streamlink/streamlink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/streamlink/streamlink/teams","hooks_url":"https://api.github.com/repos/streamlink/streamlink/hooks","issue_events_url":"https://api.github.com/repos/streamlink/streamlink/issues/events{/number}","events_url":"https://api.github.com/repos/streamlink/streamlink/events","assignees_url":"https://api.github.com/repos/streamlink/streamlink/assignees{/user}","branches_url":"https://api.github.com/repos/streamlink/streamlink/branches{/branch}","tags_url":"https://api.github.com/repos/streamlink/streamlink/tags","blobs_url":"https://api.github.com/repos/streamlink/streamlink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/streamlink/streamlink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/streamlink/streamlink/git/refs{/sha}","trees_url":"https://api.github.com/repos/streamlink/streamlink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/streamlink/streamlink/statuses/{sha}","languages_url":"https://api.github.com/repos/streamlink/streamlink/languages","stargazers_url":"https://api.github.com/repos/streamlink/streamlink/stargazers","contributors_url":"https://api.github.com/repos/streamlink/streamlink/contributors","subscribers_url":"https://api.github.com/repos/streamlink/streamlink/subscribers","subscription_url":"https://api.github.com/repos/streamlink/streamlink/subscription","commits_url":"https://api.github.com/repos/streamlink/streamlink/commits{/sha}","git_commits_url":"https://api.github.com/repos/streamlink/streamlink/git/commits{/sha}","comments_url":"https://api.github.com/repos/streamlink/streamlink/comments{/number}","issue_comment_url":"https://api.github.com/repos/streamlink/streamlink/issues/comments{/number}","contents_url":"https://api.github.com/repos/streamlink/streamlink/contents/{+path}","compare_url":"https://api.github.com/repos/streamlink/streamlink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/streamlink/streamlink/merges","archive_url":"https://api.github.com/repos/streamlink/streamlink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/streamlink/streamlink/downloads","issues_url":"https://api.github.com/repos/streamlink/streamlink/issues{/number}","pulls_url":"https://api.github.com/repos/streamlink/streamlink/pulls{/number}","milestones_url":"https://api.github.com/repos/streamlink/streamlink/milestones{/number}","notifications_url":"https://api.github.com/repos/streamlink/streamlink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/streamlink/streamlink/labels{/name}","releases_url":"https://api.github.com/repos/streamlink/streamlink/releases{/id}","deployments_url":"https://api.github.com/repos/streamlink/streamlink/deployments","created_at":"2016-09-16T17:52:50Z","updated_at":"2018-05-30T21:25:50Z","pushed_at":"2018-05-30T21:36:03Z","git_url":"git://github.com/streamlink/streamlink.git","ssh_url":"git@github.com:streamlink/streamlink.git","clone_url":"https://github.com/streamlink/streamlink.git","svn_url":"https://github.com/streamlink/streamlink","homepage":"https://streamlink.github.io/","size":33943,"stargazers_count":2182,"watchers_count":2182,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":231,"mirror_url":null,"archived":false,"open_issues_count":114,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":231,"open_issues":114,"watchers":2182,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/streamlink/streamlink/pulls/1690"},"html":{"href":"https://github.com/streamlink/streamlink/pull/1690"},"issue":{"href":"https://api.github.com/repos/streamlink/streamlink/issues/1690"},"comments":{"href":"https://api.github.com/repos/streamlink/streamlink/issues/1690/comments"},"review_comments":{"href":"https://api.github.com/repos/streamlink/streamlink/pulls/1690/comments"},"review_comment":{"href":"https://api.github.com/repos/streamlink/streamlink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/streamlink/streamlink/pulls/1690/commits"},"statuses":{"href":"https://api.github.com/repos/streamlink/streamlink/statuses/57b5740c0a811dfab25f99988efb508d468e4e4c"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"beardypig"}}