def instance_logger(instance, echoflag=None):
 if instance.logging_name:
  name = ('%s.%s.%s' % (instance.__class__.__module__, instance.__class__.__name__, instance.logging_name))
 else:
  name = ('%s.%s' % (instance.__class__.__module__, instance.__class__.__name__))
 instance._echo = echoflag
 if (echoflag in (False, None)):
  logger = logging.getLogger(name)
 else:
  logger = InstanceLogger(echoflag, name)
 instance.logger = logger

def instance_logger ( instance , echoflag = None ) : if instance . logging_name : name = ( '%s.%s.%s' % ( instance . __class__ . __module__ , instance . __class__ . __name__ , instance . logging_name ) ) else : name = ( '%s.%s' % ( instance . __class__ . __module__ , instance . __class__ . __name__ ) ) instance . _echo = echoflag if ( echoflag in ( False , None ) ) : logger = logging . getLogger ( name ) else : logger = InstanceLogger ( echoflag , name ) instance . logger = logger
create a logger for an instance that implements :class: .