code: def _add_log_handler(
          handler, level=None, fmt=None, datefmt=None, propagate=None):
      
      if not fmt:
          fmt = US_LOG_FMT
      if not datefmt:
          datefmt = US_LOG_DATE_FMT
  
      handler.setFormatter(logging.Formatter(fmt=fmt, datefmt=datefmt))
  
      if level is not None:
          handler.setLevel(level)
  
      logger = logging.getLogger('orca')
      logger.addHandler(handler)
  
      if propagate is not None:
          logger.propagate = propagate
docs: Add a logging handler to Orca.
  
      Parameters
      ----------
      handler : logging.Handler subclass
      level : int, optional
          An optional logging level that will apply only to this stream
          handler.
      fmt : str, optional
          An optional format string that will be used for the log
          messages.
      datefmt : str, optional
          An optional format string for formatting dates in the log
          messages.
      propagate : bool, optional
          Whether the Orca logger should propagate. If None the
          propagation will not be modified, otherwise it will be set
          to this value.