From fa3148798c610f13052d8ae7f60e3418069679f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Wed, 22 Nov 2023 16:27:04 +0100 Subject: [PATCH] better log output --- database.py | 4 +++- main.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/database.py b/database.py index 645ff1e..ac42c4b 100644 --- a/database.py +++ b/database.py @@ -12,7 +12,9 @@ class DBConnectionManager: def connect(self): config = read_db_config() - logger.debug("Establishing database connection.") + logger.debug("Establishing database connection with dbname={}, user={}, password={}".format( + config.db_name, config.db_user, config.db_pass + )) self._conn = psycopg2.connect("dbname='{}' user='{}' password='{}' host='localhost'".format( config.db_name, config.db_user, config.db_pass )) diff --git a/main.py b/main.py index 83cf5c1..f588503 100644 --- a/main.py +++ b/main.py @@ -24,6 +24,7 @@ def subcommand_init(force: bool): ) response = input("Do you wish to continue? [y/N] ") if response not in ["y", "Y", "yes"]: + logger.info("Database initialization aborted.") return database.init_database() logger.info("Successfully initialized database tables")