forked from Hanabi/hanabi-league
better log output
This commit is contained in:
parent
2ed40eae37
commit
fa3148798c
2 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
))
|
||||
|
|
1
main.py
1
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")
|
||||
|
|
Loading…
Reference in a new issue