Don't dump exception logs for XML stream parsing errors.
The exceptions are handled, so we don't need to clutter the output logs.
This commit is contained in:
parent
e8b2dd6698
commit
1ae219025a
1 changed files with 5 additions and 0 deletions
|
@ -763,6 +763,11 @@ class BaseXMPP(XMLStream):
|
||||||
iq = exception.iq
|
iq = exception.iq
|
||||||
log.error('Request timed out: %s', iq)
|
log.error('Request timed out: %s', iq)
|
||||||
log.warning('You should catch IqTimeout exceptions')
|
log.warning('You should catch IqTimeout exceptions')
|
||||||
|
elif isinstance(exception, SyntaxError):
|
||||||
|
# Hide stream parsing errors that occur when the
|
||||||
|
# stream is disconnected (they've been handled, we
|
||||||
|
# don't need to make a mess in the logs).
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
log.exception(exception)
|
log.exception(exception)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue