{"action":"created","comment":{"url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/comments/84021267","pull_request_review_id":4824460,"id":84021267,"diff_hunk":"@@ -515,52 +510,118 @@ def has_ui(self):\n     ##########################################################################################\n     # logging\n \n-    def log_debug(self, msg):\n+    def _emit_log_message_FUTURE(self, handler, record):\n         \"\"\"\n-        Log debug to the Maya script editor\n+        Called by the engine to log messages in Maya script editor.\n+        All log messages from the toolkit logging namespace will be passed to this method.\n+\n+        .. note:: This method will be called by the new logging system introduced in core v0.18.\n+                  It will be enabled in January 2017 by removing the method name suffix \"_FUTURE\".\n \n-        :param msg: The message to log\n+        :param handler: Log handler that this message was dispatched from.\n+                        Its default format is \"[%(levelname)s %(basename)s] %(message)s\".\n+        :type handler: :class:`~python.logging.LogHandler`\n+        :param record: Standard python logging record.\n+        :type record: :class:`~python.logging.LogRecord`\n         \"\"\"\n-        global g_last_message_time\n \n-        # get the time stamps\n-        prev_time = g_last_message_time\n-        current_time = time.time()\n+        # Give a standard format to the message:\n+        #     Shotgun DEBUG <basename>: <message>\n+        # or\n+        #     Shotgun <basename>: <message>\n+        msg = \"Shotgun %s%s: %s\" % (\"DEBUG \" if record.levelno < logging.INFO else \"\",\n+                                    record.basename,\n+                                    record.message)\n \n-        # update global counter\n-        g_last_message_time = current_time\n+        # Select Maya display function to use according to the logging record level.\n+        if record.levelno < logging.WARNING:\n+            fct = OpenMaya.MGlobal.displayInfo\n+        elif record.levelno < logging.ERROR:\n+            fct = OpenMaya.MGlobal.displayWarning\n+        else:\n+            fct = OpenMaya.MGlobal.displayError\n+\n+        # Display the message in Maya script editor in a thread safe manner.\n+        self.async_execute_in_main_thread(fct, msg)\n \n+    def log_debug(self, msg):\n+        \"\"\"\n+        Logs debug messages in Maya script editor.\n+\n+        .. note:: This method is called by the legacy logging system.\n+                  The new logging method will take over in January 2017\n+                  while preserving backward compatibility.\n+\n+        :param msg: Debug message to log.\n+                    This message has legacy format \"%(basename)s: %(message)s\".\n+        \"\"\"\n+\n+        # Do not log debug messages when debug logging setting is off.\n         if not self.get_setting(\"debug_logging\", False):\n             return\n \n-        msg = \"Shotgun Debug [%0.3fs]: %s\" % ((current_time-prev_time), msg)\n+        # Give a standard format to the message:\n+        #     Shotgun DEBUG <basename>: <message>\n+        msg = \"Shotgun DEBUG %s\" % msg\n+\n+        # Display the message in Maya script editor in a thread safe manner.\n         self.async_execute_in_main_thread(OpenMaya.MGlobal.displayInfo, msg)\n \n     def log_info(self, msg):\n         \"\"\"\n-        Log info to the Maya script editor\n+        Logs info messages in Maya script editor.\n \n-        :param msg: The message to log\n+        .. note:: This method is called by the legacy logging system.\n+                  The new logging method will take over in January 2017\n+                  while preserving backward compatibility.\n+\n+        :param msg: Info message to log.\n+                    This message has legacy format \"%(basename)s: %(message)s\".\n         \"\"\"\n-        msg = \"Shotgun: %s\" % msg\n+\n+        # Give a standard format to the message:\n+        #     Shotgun <basename>: <message>\n+        msg = \"Shotgun %s\" % msg","path":"engine.py","position":113,"original_position":113,"commit_id":"4d39ecae4cec23cd1bae5753d49b471dd4a8f036","original_commit_id":"4d39ecae4cec23cd1bae5753d49b471dd4a8f036","user":{"login":"manneohrstrom","id":337710,"avatar_url":"https://avatars.githubusercontent.com/u/337710?v=3","gravatar_id":"","url":"https://api.github.com/users/manneohrstrom","html_url":"https://github.com/manneohrstrom","followers_url":"https://api.github.com/users/manneohrstrom/followers","following_url":"https://api.github.com/users/manneohrstrom/following{/other_user}","gists_url":"https://api.github.com/users/manneohrstrom/gists{/gist_id}","starred_url":"https://api.github.com/users/manneohrstrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manneohrstrom/subscriptions","organizations_url":"https://api.github.com/users/manneohrstrom/orgs","repos_url":"https://api.github.com/users/manneohrstrom/repos","events_url":"https://api.github.com/users/manneohrstrom/events{/privacy}","received_events_url":"https://api.github.com/users/manneohrstrom/received_events","type":"User","site_admin":false},"body":"Please don't drop the colon :)","created_at":"2016-10-19T08:37:05Z","updated_at":"2016-10-19T08:45:11Z","html_url":"https://github.com/shotgunsoftware/tk-maya/pull/23#discussion_r84021267","pull_request_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/comments/84021267"},"html":{"href":"https://github.com/shotgunsoftware/tk-maya/pull/23#discussion_r84021267"},"pull_request":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/23","id":89648046,"html_url":"https://github.com/shotgunsoftware/tk-maya/pull/23","diff_url":"https://github.com/shotgunsoftware/tk-maya/pull/23.diff","patch_url":"https://github.com/shotgunsoftware/tk-maya/pull/23.patch","issue_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/23","number":23,"state":"open","locked":false,"title":"#37683: Show up the Shotgun Panel at the right place in Maya 2017.","user":{"login":"fpainchaud","id":20173280,"avatar_url":"https://avatars.githubusercontent.com/u/20173280?v=3","gravatar_id":"","url":"https://api.github.com/users/fpainchaud","html_url":"https://github.com/fpainchaud","followers_url":"https://api.github.com/users/fpainchaud/followers","following_url":"https://api.github.com/users/fpainchaud/following{/other_user}","gists_url":"https://api.github.com/users/fpainchaud/gists{/gist_id}","starred_url":"https://api.github.com/users/fpainchaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpainchaud/subscriptions","organizations_url":"https://api.github.com/users/fpainchaud/orgs","repos_url":"https://api.github.com/users/fpainchaud/repos","events_url":"https://api.github.com/users/fpainchaud/events{/privacy}","received_events_url":"https://api.github.com/users/fpainchaud/received_events","type":"User","site_admin":false},"body":"Dock a Shotgun app panel widget in a new panel tab of Maya Channel Box dock area using the proper Maya panel docking method according to the Maya version.\r\n\r\nPrepare the tk-maya engine to use the new logging system introduced in core v0.18.\r\n","created_at":"2016-10-17T15:37:21Z","updated_at":"2016-10-19T08:45:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f4c9bb54c43f47f5c1eec7a4dfa62fc29551426","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/23/commits","review_comments_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/23/comments","review_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/23/comments","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/statuses/4d39ecae4cec23cd1bae5753d49b471dd4a8f036","head":{"label":"shotgunsoftware:37683_maya_2017_panel","ref":"37683_maya_2017_panel","sha":"4d39ecae4cec23cd1bae5753d49b471dd4a8f036","user":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","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":4399199,"name":"tk-maya","full_name":"shotgunsoftware/tk-maya","owner":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","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-maya","description":"A Shotgun Pipeline Toolkit Engine for Maya","fork":false,"url":"https://api.github.com/repos/shotgunsoftware/tk-maya","forks_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/forks","keys_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/teams","hooks_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/hooks","issue_events_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/events{/number}","events_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/events","assignees_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/assignees{/user}","branches_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/branches{/branch}","tags_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/tags","blobs_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/refs{/sha}","trees_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/statuses/{sha}","languages_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/languages","stargazers_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/stargazers","contributors_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/contributors","subscribers_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/subscribers","subscription_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/subscription","commits_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/commits{/sha}","git_commits_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/commits{/sha}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/comments{/number}","issue_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/comments{/number}","contents_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/contents/{+path}","compare_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/merges","archive_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/downloads","issues_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues{/number}","pulls_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls{/number}","milestones_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/milestones{/number}","notifications_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/labels{/name}","releases_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/releases{/id}","deployments_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/deployments","created_at":"2012-05-21T21:52:36Z","updated_at":"2016-08-30T14:48:21Z","pushed_at":"2016-10-18T19:45:35Z","git_url":"git://github.com/shotgunsoftware/tk-maya.git","ssh_url":"git@github.com:shotgunsoftware/tk-maya.git","clone_url":"https://github.com/shotgunsoftware/tk-maya.git","svn_url":"https://github.com/shotgunsoftware/tk-maya","homepage":"","size":26678,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":1,"forks":12,"open_issues":1,"watchers":13,"default_branch":"master"}},"base":{"label":"shotgunsoftware:master","ref":"master","sha":"5784b3e341a846128eb51bf59d525d915248b1b2","user":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","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":4399199,"name":"tk-maya","full_name":"shotgunsoftware/tk-maya","owner":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","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-maya","description":"A Shotgun Pipeline Toolkit Engine for Maya","fork":false,"url":"https://api.github.com/repos/shotgunsoftware/tk-maya","forks_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/forks","keys_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/teams","hooks_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/hooks","issue_events_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/events{/number}","events_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/events","assignees_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/assignees{/user}","branches_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/branches{/branch}","tags_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/tags","blobs_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/refs{/sha}","trees_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/statuses/{sha}","languages_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/languages","stargazers_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/stargazers","contributors_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/contributors","subscribers_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/subscribers","subscription_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/subscription","commits_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/commits{/sha}","git_commits_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/git/commits{/sha}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/comments{/number}","issue_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/comments{/number}","contents_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/contents/{+path}","compare_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/merges","archive_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/downloads","issues_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues{/number}","pulls_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls{/number}","milestones_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/milestones{/number}","notifications_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/labels{/name}","releases_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/releases{/id}","deployments_url":"https://api.github.com/repos/shotgunsoftware/tk-maya/deployments","created_at":"2012-05-21T21:52:36Z","updated_at":"2016-08-30T14:48:21Z","pushed_at":"2016-10-18T19:45:35Z","git_url":"git://github.com/shotgunsoftware/tk-maya.git","ssh_url":"git@github.com:shotgunsoftware/tk-maya.git","clone_url":"https://github.com/shotgunsoftware/tk-maya.git","svn_url":"https://github.com/shotgunsoftware/tk-maya","homepage":"","size":26678,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":1,"forks":12,"open_issues":1,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/23"},"html":{"href":"https://github.com/shotgunsoftware/tk-maya/pull/23"},"issue":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/23"},"comments":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/shotgunsoftware/tk-maya/statuses/4d39ecae4cec23cd1bae5753d49b471dd4a8f036"}}}}
{"actor":{"display_login":"manneohrstrom"}}