From 51a33d26f632136a5afbcd8973f68a0274535ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 13 Feb 2009 13:36:57 +0100 Subject: [PATCH] Add logging info when connect to database --- trytond/backend/postgresql/database.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trytond/backend/postgresql/database.py b/trytond/backend/postgresql/database.py index 4032e7db5a..137458bf55 100644 --- a/trytond/backend/postgresql/database.py +++ b/trytond/backend/postgresql/database.py @@ -40,6 +40,8 @@ class Database(DatabaseInterface): def connect(self): if self._connpool is not None: return self + logger = logging.getLogger('database') + logger.info('connect to "%s"' % self.database_name) host = CONFIG['db_host'] and "host=%s" % CONFIG['db_host'] or '' port = CONFIG['db_port'] and "port=%s" % CONFIG['db_port'] or '' name = "dbname=%s" % self.database_name