code: def get_formatter(self, handler):
          
          if isinstance(handler, logging.handlers.SysLogHandler):
              formatter = '[%(levelname)-9s]'
          else:
              formatter = '[%(asctime)s] [%(levelname)-9s]'
  
          for p in self.prefix:
              formatter += ' [%s]' % (p)
          formatter = formatter + ' %(message)s'
          return logging.Formatter(formatter)
docs: Return formatters according to handler.
  
          All handlers are the same format, except syslog.
          We omit time when syslogging.