コード例 #1
0
def main():
    """
    The main function.

    Use the command manager to execute a command.
    """
    log.configure_logging()
    manager = CommandManager(sys.argv)
    manager.execute()
コード例 #2
0
    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)
コード例 #3
0
 def __init__(self):
     # Initialize the default logger
     log.configure_logging()