From bc1e42be313a1c0985e82157e280941cb4f94047 Mon Sep 17 00:00:00 2001 From: Hazel Noack Date: Wed, 11 Jun 2025 10:42:59 +0200 Subject: [PATCH] added barebone cli --- $REPO_NAME_SNAKE/__main__.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/$REPO_NAME_SNAKE/__main__.py b/$REPO_NAME_SNAKE/__main__.py index ac96798..7f40c11 100644 --- a/$REPO_NAME_SNAKE/__main__.py +++ b/$REPO_NAME_SNAKE/__main__.py @@ -16,3 +16,19 @@ def cli(): args = parser.parse_args() + # Configure logging based on the debug flag + if args.debug: + logging.basicConfig( + level=logging.DEBUG, + format='%(asctime)s - %(levelname)s - %(message)s' + ) + logging.debug("Debug logging enabled") + else: + logging.basicConfig( + level=logging.INFO, + format='%(asctime)s - %(levelname)s - %(message)s' + ) + + +if __name__ == "__main__": + cli()