set the log level after the config file has been parsed

This commit is contained in:
Yann Leboulanger 2005-05-18 07:38:47 +00:00
parent 277616adf2
commit 19a1f45159
2 changed files with 5 additions and 4 deletions

View File

@ -30,10 +30,6 @@ f = logging.Formatter('%(asctime)s %(name)s: %(message)s', '%d %b %Y %H:%M:%S')
h.setFormatter(f)
log = logging.getLogger('Gajim')
log.addHandler(h)
if config.get('verbose'):
log.setLevel(logging.DEBUG)
else:
log.setLevel(None)
logger = common.logger.Logger()
DATA_DIR = '../data'

View File

@ -695,6 +695,11 @@ class Interface:
'statusmsgcolor': gajim.config.get('statusmsgcolor'),
}
parser.read()
if gajim.config.get('verbose'):
log.setLevel(logging.DEBUG)
else:
gajim.log.setLevel(None)
for account in gajim.config.get_per('accounts'):
gajim.connections[account] = common.connection.Connection(account)