def initialize_collector(cls, name=None, configfile=None, handlers=[]):
 log = logging.getLogger('diamond')
 collector = None
 try:
  collector = cls(name=name, configfile=configfile, handlers=handlers)
 except Exception:
  log.error('Failed to initialize Collector: %s. %s', cls.__name__, traceback.format_exc())
 return collector

def initialize_collector ( cls , name = None , configfile = None , handlers = [ ] ) : log = logging . getLogger ( 'diamond' ) collector = None try : collector = cls ( name = name , configfile = configfile , handlers = handlers ) except Exception : log . error ( 'Failed to initialize Collector: %s. %s' , cls . __name__ , traceback . format_exc ( ) ) return collector
initialize collector .