Use own module logger for connection_zeroconf

This commit is contained in:
Philipp Hörist 2017-09-22 00:06:35 +02:00
parent f4f8db5231
commit b60fe02680
1 changed files with 4 additions and 2 deletions

View File

@ -50,6 +50,8 @@ from gajim.common.zeroconf import zeroconf
from gajim.common.zeroconf.connection_handlers_zeroconf import *
from gajim.common.connection_handlers_events import *
log = logging.getLogger('gajim.c.connection_zeroconf')
class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf):
def __init__(self, name):
ConnectionHandlersZeroconf.__init__(self)
@ -73,7 +75,7 @@ class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf):
values
"""
if not app.config.get_per('accounts', app.ZEROCONF_ACC_NAME, 'name'):
app.log.debug('Creating zeroconf account')
log.debug('Creating zeroconf account')
app.config.add_per('accounts', app.ZEROCONF_ACC_NAME)
app.config.set_per('accounts', app.ZEROCONF_ACC_NAME,
'autoconnect', True)
@ -123,7 +125,7 @@ class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf):
def reconnect(self):
# Do not try to reco while we are already trying
self.time_to_reconnect = None
app.log.debug('reconnect')
log.debug('reconnect')
self.disconnect()
self.change_status(self.old_show, self.status)