Improve logging stability
This commit is contained in:
parent
bb96dda1d4
commit
f72e120cf5
1 changed files with 2 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue