From 4b941a425c760608869d2d8f5ac188c3a72062be Mon Sep 17 00:00:00 2001 From: schlatterbeck Date: Thu, 16 Sep 2010 07:44:50 +0000 Subject: [PATCH] - more logger fixes -- use correct hierarchical logger names always starting with "roundup." -- otherwise logger configuration changed in changeset r4517 will not work (e.g. turning debugging on) git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4526 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/backends/back_anydbm.py | 2 +- roundup/backends/back_postgresql.py | 2 +- roundup/backends/back_sqlite.py | 2 +- roundup/backends/rdbms_common.py | 2 +- roundup/mailgw.py | 2 +- roundup/roundupdb.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roundup/backends/back_anydbm.py b/roundup/backends/back_anydbm.py index 0bbba4c..55c5456 100644 --- a/roundup/backends/back_anydbm.py +++ b/roundup/backends/back_anydbm.py @@ -176,7 +176,7 @@ class Database(FileStorage, hyperdb.Database, roundupdb.Database): def clear(self): """Delete all database contents """ - logging.getLogger('hyperdb').info('clear') + logging.getLogger('roundup.hyperdb').info('clear') for cn in self.classes: for dummy in 'nodes', 'journals': path = os.path.join(self.dir, 'journals.%s'%cn) diff --git a/roundup/backends/back_postgresql.py b/roundup/backends/back_postgresql.py index e066083..5d30c38 100644 --- a/roundup/backends/back_postgresql.py +++ b/roundup/backends/back_postgresql.py @@ -36,7 +36,7 @@ def connection_dict(config, dbnamestr=None): def db_create(config): """Clear all database contents and drop database itself""" command = "CREATE DATABASE %s WITH ENCODING='UNICODE'"%config.RDBMS_NAME - logging.getLogger('hyperdb').info(command) + logging.getLogger('roundup.hyperdb').info(command) db_command(config, command) def db_nuke(config, fail_ok=0): diff --git a/roundup/backends/back_sqlite.py b/roundup/backends/back_sqlite.py index 5d6be01..c9ca63b 100644 --- a/roundup/backends/back_sqlite.py +++ b/roundup/backends/back_sqlite.py @@ -99,7 +99,7 @@ class Database(rdbms_common.Database): os.makedirs(self.config.DATABASE) db = os.path.join(self.config.DATABASE, 'db') - logging.getLogger('hyperdb').info('open database %r'%db) + logging.getLogger('roundup.hyperdb').info('open database %r'%db) # set timeout (30 second default is extraordinarily generous) # for handling locked database if sqlite_version == 1: diff --git a/roundup/backends/rdbms_common.py b/roundup/backends/rdbms_common.py index 2520aba..af16196 100644 --- a/roundup/backends/rdbms_common.py +++ b/roundup/backends/rdbms_common.py @@ -445,7 +445,7 @@ class Database(FileStorage, hyperdb.Database, roundupdb.Database): # no changes return 0 - logger = logging.getLogger('hyperdb') + logger = logging.getLogger('roundup.hyperdb') logger.info('update_class %s'%spec.classname) logger.debug('old_spec %r'%(old_spec,)) diff --git a/roundup/mailgw.py b/roundup/mailgw.py index 38b3e37..d96d5ed 100644 --- a/roundup/mailgw.py +++ b/roundup/mailgw.py @@ -520,7 +520,7 @@ class MailGW: self.default_class = value.strip() self.mailer = Mailer(instance.config) - self.logger = logging.getLogger('mailgw') + self.logger = logging.getLogger('roundup.mailgw') # should we trap exceptions (normal usage) or pass them through # (for testing) diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py index 45fb8e8..7d40da4 100644 --- a/roundup/roundupdb.py +++ b/roundup/roundupdb.py @@ -137,7 +137,7 @@ class Database: # Because getting a logger requires acquiring a lock, we want # to do it only once. if not hasattr(self, '__logger'): - self.__logger = logging.getLogger('hyperdb') + self.__logger = logging.getLogger('roundup.hyperdb') return self.__logger -- 2.30.2