self.calls = 0

def __call__(self, *args, **kwargs):
    self.calls += 1
return self.inner(*args, **kwargs)

def loggerDecorator(func):

    def inner(name):
        logger = func(name)
logger.debug = LoggerLogger(logger.debug, name)
return inner
getLogger = loggerDecorator(getLogger)
Суммарный счетчик для ведения журнала Python