From: Michael Tremer Date: Sat, 7 Oct 2017 11:29:27 +0000 (+0100) Subject: Add debug logging information when connecting to the database X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=acd5aee0ddfe24801f4715c64cdca562cd030aff;p=pbs.git Add debug logging information when connecting to the database Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/__init__.py b/src/buildservice/__init__.py index 3e8843e1..365c6128 100644 --- a/src/buildservice/__init__.py +++ b/src/buildservice/__init__.py @@ -92,7 +92,7 @@ class Backend(object): return self.connect_database() def connect_database(self, section="database"): - db = self.config.get(section, "db") + name = self.config.get(section, "db") host = self.config.get(section, "host") user = self.config.get(section, "user") @@ -101,7 +101,9 @@ class Backend(object): else: pw = None - return database.Connection(host, db, user=user, password=pw) + log.debug("Connecting to database %s @ %s" % (name, host)) + + return database.Connection(host, name, user=user, password=pw) def cleanup_files(self): query = self.db.query("SELECT * FROM queue_delete")