mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 21:22:21 +03:00
log fixing
This commit is contained in:
parent
2bcf476aa8
commit
bef981e196
1 changed files with 3 additions and 4 deletions
|
@ -65,7 +65,7 @@ class Messenger(ClientXMPP):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def session_end(self):
|
def session_end(self):
|
||||||
print("disconnect")
|
self.logger.warning('[Messenger] DISCONNECTED')
|
||||||
|
|
||||||
def session_start(self, event):
|
def session_start(self, event):
|
||||||
self.logger.debug('[Messenger] Session was started')
|
self.logger.debug('[Messenger] Session was started')
|
||||||
|
@ -77,7 +77,7 @@ class Messenger(ClientXMPP):
|
||||||
self.logger.debug('[Messenger] <<--------Sending message: {}'.format(msg))
|
self.logger.debug('[Messenger] <<--------Sending message: {}'.format(msg))
|
||||||
self.send_message(mto=self.receiver, mbody=msg, mtype='normal')
|
self.send_message(mto=self.receiver, mbody=msg, mtype='normal')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.debug('[Messenger] A problem occurred while sending direct message. Error Message: {}'.format(str(e)))
|
self.logger.error('[Messenger] A problem occurred while sending direct message. Error Message: {}'.format(str(e)))
|
||||||
|
|
||||||
def recv_direct_message(self, msg):
|
def recv_direct_message(self, msg):
|
||||||
if msg['type'] in ('normal'):
|
if msg['type'] in ('normal'):
|
||||||
|
@ -87,6 +87,5 @@ class Messenger(ClientXMPP):
|
||||||
message_type = j['type']
|
message_type = j['type']
|
||||||
self.event_manger.fireEvent(message_type, str(msg['body']))
|
self.event_manger.fireEvent(message_type, str(msg['body']))
|
||||||
self.logger.debug('[Messenger] Fired event is: {}'.format(message_type))
|
self.logger.debug('[Messenger] Fired event is: {}'.format(message_type))
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.debug('[Messenger] A problem occurred while keeping message. Error Message: {}'.format(str(e)))
|
self.logger.error('[Messenger] A problem occurred while keeping message. Error Message: {}'.format(str(e)))
|
||||||
|
|
Loading…
Reference in a new issue