Skip to content

Commit

Permalink
added log_level as option
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulinaPacyna committed Oct 16, 2023
1 parent b741c5f commit ebad32d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion annotation_checker/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ def parse_arguments() -> argparse.Namespace:
type=str,
default="",
)
parser.add_argument(
"--log-level",
help="Controls how the amount of log messages",
type=str,
default="INFO",
choices=["INFO", "DEBUG"],
)

args = parser.parse_args()
return args

Expand Down Expand Up @@ -130,8 +138,9 @@ def filter_files(files: List[str], exclude_pattern: str) -> List[str]:

def main() -> None:
"""Reads the command line arguments and runs the annotation_checker"""
logger.setLevel(logging.INFO)
args = parse_arguments()
logger.setLevel(args.log_level)
logger.debug(vars(args))
files = filter_files(files=args.filenames, exclude_pattern=args.exclude_files)
logger.debug("Files: %s", files)
exit_code = 1 - check_annotated(
Expand Down

0 comments on commit ebad32d

Please sign in to comment.