Add log disable and env var loglevel

This commit is contained in:
lash
2022-01-21 00:13:07 +00:00
parent eedb63212d
commit 28ee4f7197
4 changed files with 50 additions and 8 deletions

View File

@@ -139,8 +139,9 @@ class ArgumentParser(argparse.ArgumentParser):
:type env: dict
"""
if arg_flags & Flag.VERBOSE:
self.add_argument('--no-logs', dest='no_logs',action='store_true', help='Turn off all logging')
self.add_argument('-v', action='store_true', help='Be verbose')
self.add_argument('-vv', action='store_true', help='Be more verbose')
self.add_argument('-vv', action='store_true', help='Be very verbose')
if arg_flags & Flag.CONFIG:
self.add_argument('-c', '--config', type=str, default=env.get('CONFINI_DIR'), help='Configuration directory')
self.add_argument('-n', '--namespace', type=str, help='Configuration namespace')