diff options
author | Frederick Muriuki Muriithi | 2024-10-24 15:59:09 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-10-24 16:01:08 -0500 |
commit | 5a3fb0f96a29666ef3ce698b76d49c1c1178a7f6 (patch) | |
tree | ebc195ce5e88b4ab179eb63ed47c2d6c51dbdaa1 | |
parent | 6fb2834489888937842d761cbbc7c2992a4f5a0d (diff) | |
download | gn-uploader-5a3fb0f96a29666ef3ce698b76d49c1c1178a7f6.tar.gz |
Add a `--loglevel` argument to select loglevel in scripts
To enable selection of log levels within scripts, this commit adds the
`--loglevel` argument to the list of arguments that can be passed to
scripts.
-rw-r--r-- | scripts/cli_parser.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/cli_parser.py b/scripts/cli_parser.py index 308ee4b..d42ae66 100644 --- a/scripts/cli_parser.py +++ b/scripts/cli_parser.py @@ -19,6 +19,12 @@ def init_cli_parser(program: str, description: Optional[str] = None) -> Argument type=int, default=86400, help="How long to keep any redis keys around.") + parser.add_argument( + "--loglevel", + type=str, + default="INFO", + choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"], + help="The severity of events to track with the logger.") return parser def add_global_data_arguments(parser: ArgumentParser) -> ArgumentParser: |