class BraceString(str):

    def __mod__(self, other):
        return self.format(*other)

def __str__(self):
    return self


class StyleAdapter(logging.LoggerAdapter):

    def __init__(self, logger, extra=None):
        super(StyleAdapter, self).__init__(logger, extra)

def process(self, msg, kwargs):
    if kwargs.pop('style', '%') == '{':
        msg = BraceString(msg)
return msg, kwargs
Регистрация переменных данных с новой строкой формата