code: def scope_logger(cls):
      
      cls.log = logging.getLogger('{0}.{1}'.format(cls.__module__, cls.__name__))
      return cls
docs: Class decorator for adding a class local logger
  
      Example:
      >>> @scope_logger
      >>> class Test:
      >>>     def __init__(self):
      >>>         self.log.info("class instantiated")
      >>> t = Test()