diff --git a/larigira/audiogen.py b/larigira/audiogen.py index e9c111f..4fe9bfd 100644 --- a/larigira/audiogen.py +++ b/larigira/audiogen.py @@ -3,7 +3,7 @@ import sys import argparse from .entrypoints_utils import get_one_entrypoint import json -from logging import getLogger +from logging import getLogger, basicConfig log = getLogger("audiogen") @@ -15,6 +15,7 @@ def get_audiogenerator(kind): def get_parser(): parser = argparse.ArgumentParser(description="Generate audio and output paths") + parser.add_argument("--log-level", choices=['DEBUG', 'INFO', 'WARNING', 'DEBUG'], default='WARNING') parser.add_argument( "audiospec", metavar="AUDIOSPEC", @@ -49,6 +50,7 @@ def audiogenerate(spec): def main(): """Main function for the "larigira-audiogen" executable""" args = get_parser().parse_args() + basicConfig(level=args.log_level) spec = read_spec(args.audiospec[0]) errors = tuple(check_spec(spec)) if errors: