adding debug command line option

Signed-off-by: Paige Patton <prubenda@redhat.com>
This commit is contained in:
Paige Patton
2025-10-31 09:37:24 -04:00
committed by Naga Ravi Chaitanya Elluri
parent fc7667aef1
commit 166204e3c5

View File

@@ -630,6 +630,14 @@ if __name__ == "__main__":
default=None,
)
parser.add_option(
"-d",
"--debug",
dest="debug",
help="enable debug logging",
default=False,
)
(options, args) = parser.parse_args()
# If no command or regular execution, continue with existing logic
@@ -642,7 +650,7 @@ if __name__ == "__main__":
]
logging.basicConfig(
level=logging.INFO,
level=logging.DEBUG if options.debug else logging.INFO,
format="%(asctime)s [%(levelname)s] %(message)s",
handlers=handlers,
)