def log_background_messages(self, name=None):
with self.lock:<EOL><INDENT>if name:<EOL><INDENT>self._log_messages_by_thread(name)<EOL><DEDENT>else:<EOL><INDENT>self._log_all_messages()<EOL><DEDENT><DEDENT>
Forwards messages logged on background to Robot Framework log.

        By default forwards all messages logged by all threads, but can be
        limited to a certain thread by passing thread's name as an argument.

        Logged messages are removed from the message storage.