@staticmethod
def _add_debugging_fields(gelf_dict, record):
    """Add debugging fields to the given ``gelf_dict``

        :param gelf_dict: Dictionary representing a GELF log.
        :type gelf_dict: dict

        :param record: :class:`logging.LogRecord` to extract debugging
            fields from to insert into the given ``gelf_dict``.
        :type record: logging.LogRecord
        """
    gelf_dict.update({'file': record.pathname, 'line': record.lineno,
        '_function': record.funcName, '_pid': record.process,
        '_thread_name': record.threadName})
    pn = getattr(record, 'processName', None)
    if pn is not None:
        gelf_dict['_process_name'] = pn
