Log content of lines that need fallback encoding

This commit is contained in:
jesopo 2019-03-06 17:19:37 +00:00
parent c842c459f4
commit 1b7a8bc896

View file

@ -106,8 +106,8 @@ class Socket(IRCObject.Object):
try: try:
decoded_line = line.decode(self._encoding) decoded_line = line.decode(self._encoding)
except UnicodeDecodeError: except UnicodeDecodeError:
self.log.trace("can't decode line with '%s', falling back", self.log.trace("can't decode line with '%s', falling back: %s",
[self._encoding]) [self._encoding, line])
try: try:
decoded_line = line.decode(self._fallback_encoding) decoded_line = line.decode(self._fallback_encoding)
except UnicodeDecodeError: except UnicodeDecodeError: