'Try to match a single dict with the supplied arguments.
Keys whose values are strings and which are in self._partial_matches
will be checked for partial (i.e. substring) matches. You can extend
this scheme to (for example) do regular expression matching, etc.
Return `True` if found, else `False`.
:param kwargs: A set of keyword arguments whose names are LogRecord
attributes and whose values are what you want to
match in a stored LogRecord.'

def matches(self, d, **kwargs):

    result = True
    for k in kwargs:
        v = kwargs[k]
        dv = d.get(k)
        if (not self.match_value(k, dv, v)):
            result = False
            break
    return result
