def _make_gelf_dict(self, record):
        """Create a dictionary representing a Graylog GELF log from a
        python :class:`logging.LogRecord`

        :param record: :class:`logging.LogRecord` to create a Graylog GELF
            log from.
        :type record: logging.LogRecord

        :return: dictionary representing a Graylog GELF log.
        :rtype: dict
        """
        # construct the base GELF format
        gelf_dict = {
            'version': "1.0",
            'host': BaseGELFHandler._resolve_host(self.fqdn, self.localname),
            'short_message': self.formatter.format(record) if self.formatter else record.getMessage(),
            'timestamp': record.created,
            'level': SYSLOG_LEVELS.get(record.levelno, record.levelno),
            'facility': self.facility or record.name,
        }

        # add in specified optional extras
        self._add_full_message(gelf_dict, record)
        if self.level_names:
            self._add_level_names(gelf_dict, record)
        if self.facility is not None:
            self._set_custom_facility(gelf_dict, self.facility, record)
        if self.debugging_fields:
            self._add_debugging_fields(gelf_dict, record)
        if self.extra_fields:
            self._add_extra_fields(gelf_dict, record)
        return gelf_dict
def _make_gelf_dict ( self , record ) : gelf_dict = { 'version' : "1.0" , 'host' : BaseGELFHandler . _resolve_host ( self . fqdn , self . localname ) , 'short_message' : self . formatter . format ( record ) if self . formatter else record . getMessage ( ) , 'timestamp' : record . created , 'level' : SYSLOG_LEVELS . get ( record . levelno , record . levelno ) , 'facility' : self . facility or record . name , } self . _add_full_message ( gelf_dict , record ) if self . level_names : self . _add_level_names ( gelf_dict , record ) if self . facility is not None : self . _set_custom_facility ( gelf_dict , self . facility , record ) if self . debugging_fields : self . _add_debugging_fields ( gelf_dict , record ) if self . extra_fields : self . _add_extra_fields ( gelf_dict , record ) return gelf_dict
Create a dictionary representing a Graylog GELF log from a
        python :class:`logging.LogRecord`

        :param record: :class:`logging.LogRecord` to create a Graylog GELF
            log from.
        :type record: logging.LogRecord

        :return: dictionary representing a Graylog GELF log.
        :rtype: dict