def process(self, msg=None, kwargs=None):
        """
        Process the logging message and keyword arguments passed in to
        a logging call to insert contextual information.

        Searches for ``msgid`` and ``sd`` or ``structured_data`` in the keyword arguments
        and puts them in the ``extra`` keyword argument

        We don't touch other keyword arguments so we don't interfere with possible
        other logger adapters
        """
        hostname = kwargs.pop('hostname', None)
        appname = kwargs.pop('appname', None)
        procid = kwargs.pop('procid', None)
        msgid = kwargs.pop('msgid', None)
        structured_data = kwargs.pop('sd', None)

        if structured_data is None:
            structured_data = kwargs.pop('structured_data', None)

        extra = self.extra.copy()
        extra.update(kwargs.get('extra', {}))
        kwargs['extra'] = extra

        if hostname:
            kwargs['extra']['hostname'] = hostname
        if appname:
            kwargs['extra']['appname'] = appname
        if procid:
            kwargs['extra']['procid'] = procid
        if msgid:
            kwargs['extra']['msgid'] = msgid
        if structured_data:
            kwargs['extra']['structured_data'] = structured_data

        return msg, kwargs