mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-01-12 19:16:10 +00:00
fix: #396 Using kodi_version to determine loglevel
This commit is contained in:
parent
cf1ee30e18
commit
ad941ae483
1 changed files with 7 additions and 1 deletions
|
@ -14,6 +14,7 @@ import database
|
|||
from helper import get_filesystem_encoding
|
||||
|
||||
from . import settings
|
||||
from . import kodi_version
|
||||
|
||||
##################################################################################################
|
||||
|
||||
|
@ -49,6 +50,11 @@ class LogHandler(logging.StreamHandler):
|
|||
|
||||
self.mask_info = settings('maskInfo.bool')
|
||||
|
||||
if kodi_version() > 18:
|
||||
self.level = xbmc.LOGINFO
|
||||
else:
|
||||
self.level = xbmc.LOGNOTICE
|
||||
|
||||
def emit(self, record):
|
||||
|
||||
if self._get_log_level(record.levelno):
|
||||
|
@ -61,7 +67,7 @@ class LogHandler(logging.StreamHandler):
|
|||
for token in self.sensitive['Token']:
|
||||
string = string.replace(token or "{token}", "{jellyfin-token}")
|
||||
|
||||
xbmc.log(string, level=getattr(xbmc, 'LOGNOTICE', xbmc.LOGINFO))
|
||||
xbmc.log(string, level=self.level)
|
||||
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in a new issue