As the question says, how can I do it? following is the code-
import logging
from sleekxmpp import ClientXMPP
logging.basicConfig(level=logging.DEBUG, format='%(levelname)-8s %(message)s')
def on_session(event):
xmpp.get_roster()
xmpp = ClientXMPP(jid, password)
xmpp.add_event_handler('session_start', on_session)
if xmpp.connect():
print xmpp.authenticated # Always prints `False`
xmpp.process(block=True)
I can see that printing in the logs, but I rather want to check it in the code as well. How can I do it?