set the log level after the config file has been parsed
This commit is contained in:
parent
277616adf2
commit
19a1f45159
|
@ -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'
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue