def main(): """ The main function. Use the command manager to execute a command. """ log.configure_logging() manager = CommandManager(sys.argv) manager.execute()
def _init_logging(self): config_lvl = self.config.get('logging', {}).get('level', 'info') color = self.config.get('logging', {}).get('color', True) level = logging.getLevelName(config_lvl.upper()) if not isinstance(level, int): raise CommandError('Invalid logging level \'%s\' in s2e.yaml' % config_lvl) log.configure_logging(level, color)
def __init__(self): # Initialize the default logger log.configure_logging()