def emit(
            self,
            record):
        """emit

        Emit handler for queue-ing message for
        the helper thread to send to Splunk on the ``self.sleep_interval``

        :param record: LogRecord to send to Splunk
                       https://docs.python.org/3/library/logging.html
        """
        self.debug_log('emit - start')

        try:
            record = self.format_record(
                record)
        except Exception as e:
            self.write_log(
                'exception in Splunk logging handler: %s' % str(e))
            self.write_log(
                traceback.format_exc())
            return

        if not self.is_shutting_down(shutdown_event=self.shutdown_event) \
                and self.sleep_interval > 0.1:
            try:
                self.debug_log(
                    'writing to queue={}'.format(
                        self.queue))
                # Put log message into queue; worker thread will pick up
                self.queue.put(
                    record)
            except Exception as e:
                self.write_log(
                    'log queue full; log data will be dropped.')
        else:
            # Publish immediately because there is no worker
            self.publish_to_splunk(
                payload=record)

        self.debug_log('emit - done')
emit

        Emit handler for queue-ing message for
        the helper thread to send to Splunk on the ``self.sleep_interval``

        :param record: LogRecord to send to Splunk
                       https://docs.python.org/3/library/logging.html