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)
|
h.setFormatter(f)
|
||||||
log = logging.getLogger('Gajim')
|
log = logging.getLogger('Gajim')
|
||||||
log.addHandler(h)
|
log.addHandler(h)
|
||||||
if config.get('verbose'):
|
|
||||||
log.setLevel(logging.DEBUG)
|
|
||||||
else:
|
|
||||||
log.setLevel(None)
|
|
||||||
|
|
||||||
logger = common.logger.Logger()
|
logger = common.logger.Logger()
|
||||||
DATA_DIR = '../data'
|
DATA_DIR = '../data'
|
||||||
|
|
|
@ -696,6 +696,11 @@ class Interface:
|
||||||
}
|
}
|
||||||
parser.read()
|
parser.read()
|
||||||
|
|
||||||
|
if gajim.config.get('verbose'):
|
||||||
|
log.setLevel(logging.DEBUG)
|
||||||
|
else:
|
||||||
|
gajim.log.setLevel(None)
|
||||||
|
|
||||||
for account in gajim.config.get_per('accounts'):
|
for account in gajim.config.get_per('accounts'):
|
||||||
gajim.connections[account] = common.connection.Connection(account)
|
gajim.connections[account] = common.connection.Connection(account)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue