Add timestamp for (dis)connect to debug-log

This commit is contained in:
Thor77 2016-10-04 15:18:08 +02:00
parent c59d182da4
commit 040b451c7d
1 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ class Client(object):
:param timestamp: time of connect :param timestamp: time of connect
:type timestamp: int :type timestamp: int
''' '''
logger.debug('CONNECT %s', self) logger.debug('[%s] CONNECT %s', timestamp, self)
self.connected += 1 self.connected += 1
self._last_connect = timestamp self._last_connect = timestamp
@ -98,7 +98,7 @@ class Client(object):
:param timestamp: time of disconnect :param timestamp: time of disconnect
:type timestamp: int :type timestamp: int
''' '''
logger.debug('DISCONNECT %s', self) logger.debug('[%s] DISCONNECT %s', timestamp, self)
if not self.connected: if not self.connected:
logger.debug('^ disconnect before connect') logger.debug('^ disconnect before connect')
raise InvalidLog('disconnect before connect!') raise InvalidLog('disconnect before connect!')