PgDB: add INFO log message on server connection

This commit is contained in:
Benjamin Renard 2021-11-18 19:56:18 +01:00
parent 5acbdbe8e3
commit b7a576eb52

View file

@ -81,6 +81,9 @@ class PgDB:
""" Connect to PostgreSQL server """
if self._conn is None:
try:
log.info(
'Connect on PostgreSQL server %s as %s on database %s',
self._host, self._user, self._db)
self._conn = psycopg2.connect(
dbname=self._db,
user=self._user,