code: def do_handle_log(self, workunit, level, *msg_elements):
      
      if not self.is_under_main_root(workunit):
        return
  
      # If the element is a (msg, detail) pair, we ignore the detail. There's no
      # useful way to display it on the console.
      elements = [e if isinstance(e, six.string_types) else e[0] for e in msg_elements]
      msg = '\n' + ''.join(elements)
      if self.use_color_for_workunit(workunit, self.settings.color):
        msg = self._COLOR_BY_LEVEL.get(level, lambda x: x)(msg)
  
      self.emit(self._prefix(workunit, msg))
      self.flush()
docs: Implementation of Reporter callback.