diff --git a/negromate/songs/commands/__init__.py b/negromate/songs/commands/__init__.py index 4e7ce11..bc5451e 100644 --- a/negromate/songs/commands/__init__.py +++ b/negromate/songs/commands/__init__.py @@ -1,5 +1,6 @@ import argparse import configparser +import logging import traceback import sys from pathlib import Path @@ -91,6 +92,9 @@ def main(): # Build parser parser = argparse.ArgumentParser() + parser.add_argument( + '-v', '--verbose', action='store_true', + help="Display informational messages.") parser.set_defaults(command=None) subparsers = parser.add_subparsers() for command in commands: @@ -100,6 +104,8 @@ def main(): # Run command args = parser.parse_args(args[1:]) + if args.verbose: + logging.basicConfig(level=logging.DEBUG) if args.command is None: parser.print_usage() else: