def makeRecord(self, name, level, fn, lno, msg, args, exc_info,
                   func=None, extra=None, sinfo=None):
        # Let's remove exc_info_on_loglevel from extra
        exc_info_on_loglevel = extra.pop('exc_info_on_loglevel')
        if not extra:
            # If nothing else is in extra, make it None
            extra = None

        # Let's try to make every logging message unicode
        if isinstance(msg, six.string_types) \
                and not isinstance(msg, six.text_type):
            salt_system_encoding = __salt_system_encoding__
            if salt_system_encoding == 'ascii':
                # Encoding detection most likely failed, let's use the utf-8
                # value which we defaulted before __salt_system_encoding__ was
                # implemented
                salt_system_encoding = 'utf-8'
            try:
                _msg = msg.decode(salt_system_encoding, 'replace')
            except __HOLE__:
                _msg = msg.decode(salt_system_encoding, 'ignore')
        else:
            _msg = msg

        if six.PY3:
            logrecord = _LOG_RECORD_FACTORY(name, level, fn, lno, _msg, args,
                                            exc_info, func, sinfo)
        else:
            logrecord = _LOG_RECORD_FACTORY(name, level, fn, lno, _msg, args,
                                            exc_info, func)

        if extra is not None:
            for key in extra:
                if (key in ['message', 'asctime']) or (key in logrecord.__dict__):
                    raise KeyError(
                        'Attempt to overwrite \'{0}\' in LogRecord'.format(key)
                    )
                logrecord.__dict__[key] = extra[key]

        if exc_info_on_loglevel is not None:
            # Let's add some custom attributes to the LogRecord class in order
            # to include the exc_info on a per handler basis. This will allow
            # showing tracebacks on logfiles but not on console if the logfile
            # handler is enabled for the log level "exc_info_on_loglevel" and
            # console handler is not.
            logrecord.exc_info_on_loglevel_instance = sys.exc_info()
            logrecord.exc_info_on_loglevel_formatted = None

        logrecord.exc_info_on_loglevel = exc_info_on_loglevel
        return logrecord

    # pylint: enable=C0103


# Override the python's logging logger class as soon as this module is imported
dataset/ETHPy150Open saltstack/salt/salt/log/setup.py/SaltLoggingClass.makeRecord