Skip to content

Commit

Permalink
Hide info logs when running multiple problems
Browse files Browse the repository at this point in the history
  • Loading branch information
nikobockerman committed Dec 14, 2023
1 parent 2970925 commit a097f21
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion adventofcode/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ def main(
problem: Annotated[Optional[int], typer.Argument()] = None,
debug: Annotated[bool, typer.Option("--debug", "-d")] = False,
) -> None:
level = logging.INFO
if debug:
level = logging.DEBUG
elif day is None or problem is None:
level = logging.WARNING
else:
level = logging.INFO
logging.basicConfig(level=level)

exit_code: int = 0
Expand Down

0 comments on commit a097f21

Please sign in to comment.