Exemple #1
0
 def inner(config, logfile, *args):
     if isinstance(config, str):
         conf_file = config
         config = ConfigParser()
         config.readfp(open(conf_file))
     logger.start(logfile=logfile)
     sourcefile = inspect.getabsfile(main)
     logger.info('*** Starting logger ***')
     logger.info('*** Running file %s ***' % sourcefile)
     try:
         main(config, logfile, *args)
     except:
         logger.exception("Unexpected Error.")
     logger.info('*** Leaving file %s ***' % sourcefile)
     logger.info('*** Stopping logger ***')
     logger.end()
Exemple #2
0
 def exit(self):
     try:
         log.end()
     except:
         pass