diff --git a/resources/lib/connect/credentials.py b/resources/lib/connect/credentials.py index f7f9fa36..64f40995 100644 --- a/resources/lib/connect/credentials.py +++ b/resources/lib/connect/credentials.py @@ -43,7 +43,7 @@ class Credentials(object): log.warn(e) self.credentials = {} - log.info("credentials initialized with: %s" % self.credentials) + log.debug("credentials initialized with: %s" % self.credentials) self.credentials['Servers'] = self.credentials.setdefault('Servers', []) def _get(self): diff --git a/resources/lib/loghandler.py b/resources/lib/loghandler.py index 5169d361..6a891540 100644 --- a/resources/lib/loghandler.py +++ b/resources/lib/loghandler.py @@ -5,7 +5,7 @@ import logging import xbmc -from utils import window +from utils import window, settings ################################################################################################## @@ -27,10 +27,13 @@ class LogHandler(logging.StreamHandler): def emit(self, record): if self._get_log_level(record.levelno): + string = self.format(record) + string = string.replace(settings('server') or "{server}", "{emby-server}") + string = string.replace(settings('token') or "{token}", "{emby-token}") try: - xbmc.log(self.format(record), level=xbmc.LOGNOTICE) + xbmc.log(string, level=xbmc.LOGNOTICE) except UnicodeEncodeError: - xbmc.log(self.format(record).encode('utf-8'), level=xbmc.LOGNOTICE) + xbmc.log(string.encode('utf-8'), level=xbmc.LOGNOTICE) @classmethod def _get_log_level(cls, level):