Improve logging stability

This commit is contained in:
tomkat83 2016-09-01 19:09:51 +02:00
parent bb96dda1d4
commit f72e120cf5

View file

@ -5,7 +5,7 @@
import logging
import xbmc
from utils import window
from utils import window, tryEncode
##################################################################################################
@ -30,7 +30,7 @@ class LogHandler(logging.StreamHandler):
try:
xbmc.log(self.format(record), level=xbmc.LOGNOTICE)
except UnicodeEncodeError:
xbmc.log(self.format(record).encode('utf-8'), level=xbmc.LOGNOTICE)
xbmc.log(tryEncode(self.format(record)), level=xbmc.LOGNOTICE)
@classmethod
def _get_log_level(cls, level):