{"action":"created","comment":{"url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/comments/146541503","pull_request_review_id":71495922,"id":146541503,"diff_hunk":"@@ -278,6 +291,48 @@ def __init__(self, parent=None):\n         # be done only when the dialog is fully initialized.\n         self._load_settings()\n \n+    def _debug_toggled(self, state):\n+        \"\"\"\n+        Toggles global debug logging and stores the given state as an\n+        engine level user setting.\n+\n+        :param bool state: The debug state to set.\n+        \"\"\"\n+        self.user_preferred_debug_logging = state\n+        sgtk.LogManager().global_debug = state\n+        sgtk.platform.current_engine().set_global_debug(state)","path":"python/tk_desktop/desktop_window.py","position":40,"original_position":40,"commit_id":"134fb3edf60bbd284a0b6c7ad22d1f7fd266207a","original_commit_id":"134fb3edf60bbd284a0b6c7ad22d1f7fd266207a","user":{"login":"jfboismenu","id":8126447,"avatar_url":"https://avatars0.githubusercontent.com/u/8126447?v=4","gravatar_id":"","url":"https://api.github.com/users/jfboismenu","html_url":"https://github.com/jfboismenu","followers_url":"https://api.github.com/users/jfboismenu/followers","following_url":"https://api.github.com/users/jfboismenu/following{/other_user}","gists_url":"https://api.github.com/users/jfboismenu/gists{/gist_id}","starred_url":"https://api.github.com/users/jfboismenu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfboismenu/subscriptions","organizations_url":"https://api.github.com/users/jfboismenu/orgs","repos_url":"https://api.github.com/users/jfboismenu/repos","events_url":"https://api.github.com/users/jfboismenu/events{/privacy}","received_events_url":"https://api.github.com/users/jfboismenu/received_events","type":"User","site_admin":false},"body":"This will fail automatically when you are not inside a project, which will yield a warning in the console that is not warranted.","created_at":"2017-10-24T12:22:14Z","updated_at":"2017-10-24T12:26:31Z","html_url":"https://github.com/shotgunsoftware/tk-desktop/pull/85#discussion_r146541503","pull_request_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/85","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/comments/146541503"},"html":{"href":"https://github.com/shotgunsoftware/tk-desktop/pull/85#discussion_r146541503"},"pull_request":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/85"}}},"pull_request":{"url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/85","id":147920048,"html_url":"https://github.com/shotgunsoftware/tk-desktop/pull/85","diff_url":"https://github.com/shotgunsoftware/tk-desktop/pull/85.diff","patch_url":"https://github.com/shotgunsoftware/tk-desktop/pull/85.patch","issue_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/85","number":85,"state":"open","locked":false,"title":"For #43813: Adds a debug logging toggle action to the Advanced menu.","user":{"login":"thebeeland","id":4913787,"avatar_url":"https://avatars0.githubusercontent.com/u/4913787?v=4","gravatar_id":"","url":"https://api.github.com/users/thebeeland","html_url":"https://github.com/thebeeland","followers_url":"https://api.github.com/users/thebeeland/followers","following_url":"https://api.github.com/users/thebeeland/following{/other_user}","gists_url":"https://api.github.com/users/thebeeland/gists{/gist_id}","starred_url":"https://api.github.com/users/thebeeland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thebeeland/subscriptions","organizations_url":"https://api.github.com/users/thebeeland/orgs","repos_url":"https://api.github.com/users/thebeeland/repos","events_url":"https://api.github.com/users/thebeeland/events{/privacy}","received_events_url":"https://api.github.com/users/thebeeland/received_events","type":"User","site_admin":false},"body":"The action follows these rules:\r\n\r\n1. If TK_DEBUG is set in the environment, debug logging is always on and the menu action is disabled.\r\n2. If the user previously used this menu action to turn debugging on or off, that is remembered in engine-level user settings and will be preserved when SG Desktop is relaunched.\r\n3. If TK_DEBUG is not set in the environment and the user has not previously used this menu action to toggle debug logging on or off, the checked state of the action will match the global debug setting as reported by the LogManager.\r\n\r\nThe only bit here that is unfortunate is that QMenu in Qt4.x does not support showing tooltips for QActions. I've included tooltips anyway, as presumably someday this will be running in Qt 5.x and they'll just start showing properly.","created_at":"2017-10-21T00:48:10Z","updated_at":"2017-10-24T12:26:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e7b6e535729e88e36fd5a6fe5b8296951861ac7","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/85/commits","review_comments_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/85/comments","review_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/85/comments","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/statuses/134fb3edf60bbd284a0b6c7ad22d1f7fd266207a","head":{"label":"shotgunsoftware:43813_toggle_debug","ref":"43813_toggle_debug","sha":"134fb3edf60bbd284a0b6c7ad22d1f7fd266207a","user":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars1.githubusercontent.com/u/317894?v=4","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":14870751,"name":"tk-desktop","full_name":"shotgunsoftware/tk-desktop","owner":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars1.githubusercontent.com/u/317894?v=4","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shotgunsoftware/tk-desktop","description":"A Shotgun Pipeline Toolkit engine for desktop applications and operating system integration.","fork":false,"url":"https://api.github.com/repos/shotgunsoftware/tk-desktop","forks_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/forks","keys_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/teams","hooks_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/hooks","issue_events_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/events","assignees_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/tags","blobs_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/languages","stargazers_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/stargazers","contributors_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/contributors","subscribers_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/subscribers","subscription_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/subscription","commits_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/merges","archive_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/downloads","issues_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/labels{/name}","releases_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/deployments","created_at":"2013-12-02T18:22:12Z","updated_at":"2017-04-19T02:21:35Z","pushed_at":"2017-10-24T01:32:53Z","git_url":"git://github.com/shotgunsoftware/tk-desktop.git","ssh_url":"git@github.com:shotgunsoftware/tk-desktop.git","clone_url":"https://github.com/shotgunsoftware/tk-desktop.git","svn_url":"https://github.com/shotgunsoftware/tk-desktop","homepage":null,"size":4337,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":4,"forks":13,"open_issues":4,"watchers":8,"default_branch":"master"}},"base":{"label":"shotgunsoftware:master","ref":"master","sha":"35d9f8e4dd5e5572d1b3e62cbdbcb9c8fa406b0e","user":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars1.githubusercontent.com/u/317894?v=4","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":14870751,"name":"tk-desktop","full_name":"shotgunsoftware/tk-desktop","owner":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars1.githubusercontent.com/u/317894?v=4","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shotgunsoftware/tk-desktop","description":"A Shotgun Pipeline Toolkit engine for desktop applications and operating system integration.","fork":false,"url":"https://api.github.com/repos/shotgunsoftware/tk-desktop","forks_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/forks","keys_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/teams","hooks_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/hooks","issue_events_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/events","assignees_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/tags","blobs_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/languages","stargazers_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/stargazers","contributors_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/contributors","subscribers_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/subscribers","subscription_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/subscription","commits_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/merges","archive_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/downloads","issues_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/labels{/name}","releases_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/shotgunsoftware/tk-desktop/deployments","created_at":"2013-12-02T18:22:12Z","updated_at":"2017-04-19T02:21:35Z","pushed_at":"2017-10-24T01:32:53Z","git_url":"git://github.com/shotgunsoftware/tk-desktop.git","ssh_url":"git@github.com:shotgunsoftware/tk-desktop.git","clone_url":"https://github.com/shotgunsoftware/tk-desktop.git","svn_url":"https://github.com/shotgunsoftware/tk-desktop","homepage":null,"size":4337,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":4,"forks":13,"open_issues":4,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/85"},"html":{"href":"https://github.com/shotgunsoftware/tk-desktop/pull/85"},"issue":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/85"},"comments":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/issues/85/comments"},"review_comments":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/85/comments"},"review_comment":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/pulls/85/commits"},"statuses":{"href":"https://api.github.com/repos/shotgunsoftware/tk-desktop/statuses/134fb3edf60bbd284a0b6c7ad22d1f7fd266207a"}},"author_association":"NONE"}}
{"actor":{"display_login":"jfboismenu"}}