diff options
Diffstat (limited to 'src/buildstream/sandbox')
-rw-r--r-- | src/buildstream/sandbox/_sandboxremote.py | 2 | ||||
-rw-r--r-- | src/buildstream/sandbox/sandbox.py | 23 |
2 files changed, 12 insertions, 13 deletions
diff --git a/src/buildstream/sandbox/_sandboxremote.py b/src/buildstream/sandbox/_sandboxremote.py index 8c9515497..affe597dd 100644 --- a/src/buildstream/sandbox/_sandboxremote.py +++ b/src/buildstream/sandbox/_sandboxremote.py @@ -106,7 +106,7 @@ class SandboxRemote(Sandbox): self.operation_name = None def info(self, msg): - self._get_context().messenger.message(Message(None, MessageType.INFO, msg)) + self._get_context().messenger.message(Message(MessageType.INFO, msg)) @staticmethod def specs_from_config_node(config_node, basedir=None): diff --git a/src/buildstream/sandbox/sandbox.py b/src/buildstream/sandbox/sandbox.py index 8ff0aafa2..6956a7d59 100644 --- a/src/buildstream/sandbox/sandbox.py +++ b/src/buildstream/sandbox/sandbox.py @@ -120,12 +120,12 @@ class Sandbox(): self.__allow_real_directory = kwargs['allow_real_directory'] self.__allow_run = True - # Plugin ID for logging + # Plugin element full name for logging plugin = kwargs.get('plugin', None) if plugin: - self.__plugin_id = plugin._unique_id + self.__element_name = plugin._get_full_name() else: - self.__plugin_id = None + self.__element_name = None # Configuration from kwargs common to all subclasses self.__config = kwargs['config'] @@ -574,12 +574,12 @@ class Sandbox(): return False - # _get_plugin_id() + # _get_element_name() # - # Get the plugin's unique identifier + # Get the plugin's element full name # - def _get_plugin_id(self): - return self.__plugin_id + def _get_element_name(self): + return self.__element_name # _callback() # @@ -633,8 +633,7 @@ class Sandbox(): # details (str): optional, more detatils def _issue_warning(self, message, detail=None): self.__context.messenger.message( - Message(None, - MessageType.WARN, + Message(MessageType.WARN, message, detail=detail ) @@ -660,7 +659,7 @@ class _SandboxBatch(): def execute_group(self, group): if group.label: context = self.sandbox._get_context() - cm = context.messenger.timed_activity(group.label, unique_id=self.sandbox._get_plugin_id()) + cm = context.messenger.timed_activity(group.label, element_name=self.sandbox._get_element_name()) else: cm = contextlib.suppress() @@ -670,8 +669,8 @@ class _SandboxBatch(): def execute_command(self, command): if command.label: context = self.sandbox._get_context() - message = Message(self.sandbox._get_plugin_id(), MessageType.STATUS, - 'Running command', detail=command.label) + message = Message(MessageType.STATUS, 'Running command', detail=command.label, + element_name=self.sandbox._get_element_name()) context.messenger.message(message) exitcode = self.sandbox._run(command.command, self.flags, cwd=command.cwd, env=command.env) |