From aae9115b239ea891638bef3c0a527b3b457727ba Mon Sep 17 00:00:00 2001 From: agres Date: Mon, 24 Mar 2025 10:09:13 +0100 Subject: [PATCH] added a function witch sets the console handler to DEBUG level. this can be used for verbose logging --- src/database_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/database_handler.py b/src/database_handler.py index 63c413c..9b4fdab 100644 --- a/src/database_handler.py +++ b/src/database_handler.py @@ -107,9 +107,10 @@ class Database: log.error(f"Error while reading all rows from table {table.value}: {e}") return [] - def close(self): + def close(self, message: str): """Close the database connection""" self.conn.close() + log.info(f"Database connection closed from file: {message}") def get_total_overview(self) -> list: """Retrieve a total overview of all recently played songs with full details"""