code: def initialize_logging(self):
          
          # Reset logging to pass logrecords into the queue to the frontend only.
          # Existing handlers may be broken as they were copied into a new process,
          # so should be discarded.
          for loggername in [None] + list(logging.Logger.manager.loggerDict.keys()):
              logger = logging.getLogger(loggername)
              while logger.handlers:
                  logger.removeHandler(logger.handlers[0])
  
          # Re-enable logging to console
          root_logger = logging.getLogger()
  
          # By default pass all warning (and higher) level messages to the frontend
          root_logger.setLevel(logging.WARN)
          root_logger.addHandler(workflows.logging.CallbackHandler(self._log_send))
  
          # Set up the service logger and pass all info (and higher) level messages
          # (or other level if set differently)
          self.log = logging.getLogger(self._logger_name)
  
          if self.start_kwargs.get("verbose_log"):
              self.log_verbosity = logging.DEBUG
          self.log.setLevel(self.log_verbosity)
  
          # Additionally, write all critical messages directly to console
          console = logging.StreamHandler()
          console.setLevel(logging.CRITICAL)
          root_logger.addHandler(console)
docs: Reset the logging for the service process. All logged messages are
          forwarded to the frontend. If any filtering is desired, then this must
          take place on the service side.