summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-07-17 21:17:02 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-07-17 21:17:02 +0100
commit2d2a80c73da0c2da3346ceb55679beb63bb602d0 (patch)
treeefb50b437d7ce080365864ccf30f33231150466e
parent4dfdd5d8e3a7798b1ff8547bcdeceaff2fc3405a (diff)
downloadslixmpp-2d2a80c73da0c2da3346ceb55679beb63bb602d0.tar.gz
slixmpp-2d2a80c73da0c2da3346ceb55679beb63bb602d0.tar.bz2
slixmpp-2d2a80c73da0c2da3346ceb55679beb63bb602d0.tar.xz
slixmpp-2d2a80c73da0c2da3346ceb55679beb63bb602d0.zip
xmlstream: Remove pygments dumping.
It’s slow and makes the debug logs difficult to parse.
-rw-r--r--slixmpp/xmlstream/xmlstream.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py
index a9e62577..327de7db 100644
--- a/slixmpp/xmlstream/xmlstream.py
+++ b/slixmpp/xmlstream/xmlstream.py
@@ -22,7 +22,7 @@ import uuid
import xml.etree.ElementTree as ET
from slixmpp.xmlstream.asyncio import asyncio
-from slixmpp.xmlstream import tostring, highlight
+from slixmpp.xmlstream import tostring
from slixmpp.xmlstream.stanzabase import StanzaBase, ElementBase
from slixmpp.xmlstream.resolver import resolve, default_resolver
@@ -375,12 +375,11 @@ class XMLStream(asyncio.BaseProtocol):
if self.xml_depth == 0:
# We have received the start of the root element.
self.xml_root = xml
- log.debug('RECV: %s',
- highlight(tostring(self.xml_root,
- xmlns=self.default_ns,
- stream=self,
- top_level=True,
- open_only=True)))
+ log.debug('RECV: %s', tostring(self.xml_root,
+ xmlns=self.default_ns,
+ stream=self,
+ top_level=True,
+ open_only=True))
self.start_stream_handler(self.xml_root)
self.xml_depth += 1
if event == 'end':
@@ -875,8 +874,7 @@ class XMLStream(asyncio.BaseProtocol):
if data is None:
return
str_data = tostring(data.xml, xmlns=self.default_ns,
- stream=self,
- top_level=True)
+ stream=self, top_level=True)
self.send_raw(str_data)
else:
self.send_raw(data)
@@ -894,7 +892,7 @@ class XMLStream(asyncio.BaseProtocol):
:param string data: Any bytes or utf-8 string value.
"""
- log.debug("SEND: %s", highlight(data))
+ log.debug("SEND: %s", data)
if not self.transport:
raise NotConnectedError()
if isinstance(data, str):
@@ -947,7 +945,7 @@ class XMLStream(asyncio.BaseProtocol):
if stanza is None:
return
- log.debug("RECV: %s", highlight(stanza))
+ log.debug("RECV: %s", stanza)
# Match the stanza against registered handlers. Handlers marked
# to run "in stream" will be executed immediately; the rest will