You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
hi, I'm looking some way to monitor raw xml stream, and noticed that in changelog of 2003:
2003-08-08 08:02 +0000 [r96] Jacek Konieczny jajcus@jajcus.net
* pyxmpp/stream.py:
- data_in() and data_out() methods to override for 'raw XML
console'
but data_in() and data_out methods are missing in the new version.
How can I monitor the raw xml stream?
The text was updated successfully, but these errors were encountered:
Now the XML streams are logged using the Python standard 'logging' module -- the data is fed to the 'pyxmpp.Stream.in' and 'pyxmpp.Stream.out' loggers:
Here is sample code printing stream data (based on CJC 'xmlconsole' module):
{{{
#!python
import logging
class DataInHandler(logging.Handler):
def init(self):
logging.Handler.init(self, level = logging.DEBUG)
def emit(self, record):
data=record.args[0]
if not data or data in (" ", "\n"):
# skip keepalive data (but we are not sure it is keepalive)
return
print "IN:", record.args[0]
class DataOutHandler(logging.Handler):
def init(self):
logging.Handler.init(self, level = logging.DEBUG)
def emit(self, record):
data = record.args[0]
if not data or data in (" ", "\n"):
# skip keepalive data (but we are not sure it is keepalive)
return
print "OUT:", record.args[0]
hi, I'm looking some way to monitor raw xml stream, and noticed that in changelog of 2003:
2003-08-08 08:02 +0000 [r96] Jacek Konieczny jajcus@jajcus.net
* pyxmpp/stream.py:
- data_in() and data_out() methods to override for 'raw XML
console'
but data_in() and data_out methods are missing in the new version.
How can I monitor the raw xml stream?
The text was updated successfully, but these errors were encountered: