diff options
| author | Pinapelz <yukais@pinapelz.com> | 2024-10-04 11:16:17 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2024-10-04 11:38:15 -0700 |
| commit | 8484b4e0c48524faf02b087eca4b5238fc593c9b (patch) | |
| tree | c90e0d0994312735f846bddc7d2fdad123ab41f7 /sql | |
| parent | 0385ad5a075cc636052ae3452e6977f4dfe609b2 (diff) | |
improve output logging
- logs to file
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/pg_handler.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/pg_handler.py b/sql/pg_handler.py index 74a9170..b528a26 100644 --- a/sql/pg_handler.py +++ b/sql/pg_handler.py @@ -11,7 +11,7 @@ class PostgresHandler: "port": port } self._connection = psycopg2.connect(**db_params) - print("Handler Success") + self.print_to_debug("Connected to database successfully") def get_connection(self): return self._connection @@ -163,6 +163,9 @@ class PostgresHandler: print(f"Failed to get most recently added row from {table_name}") print(e) return False + + def print_to_debug(self, message: str): + print("[PostgresHandler] " + message) def close_connection(self): |
