From f771b8d3aa04a0404ff44250617dde126364edba Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 18 Dec 2020 19:32:28 +0100 Subject: [PATCH] Fix logging for Python 3 --- resources/lib/loghandler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/loghandler.py b/resources/lib/loghandler.py index c32fd0d0..b7bb8789 100644 --- a/resources/lib/loghandler.py +++ b/resources/lib/loghandler.py @@ -6,7 +6,7 @@ import xbmc LEVELS = { logging.ERROR: xbmc.LOGERROR, logging.WARNING: xbmc.LOGWARNING, - logging.INFO: xbmc.LOGNOTICE, + logging.INFO: xbmc.LOGINFO, logging.DEBUG: xbmc.LOGDEBUG } ############################################################################### @@ -37,7 +37,7 @@ def config(): class LogHandler(logging.StreamHandler): def __init__(self): logging.StreamHandler.__init__(self) - self.setFormatter(logging.Formatter(fmt=b"%(name)s: %(message)s")) + self.setFormatter(logging.Formatter(fmt='%(name)s: %(message)s')) def emit(self, record): if isinstance(record.msg, str):