Skip to content

Commit

Permalink
Filter based on max_log_level correctly (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
dagwieers authored Oct 3, 2019
1 parent b1c71b1 commit 08a230f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions resources/lib/kodiwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,8 @@ def log_access(self, url, query_string=None, log_level='Verbose'):
def log(self, message, log_level='Info', **kwargs):
''' Log info messages to Kodi '''
cur_log_level = LOG_LEVELS.get(log_level, 0)
if cur_log_level > self._max_log_level:
return
if not self._debug_logging and 1 < cur_log_level <= self._max_log_level:
# If Debug Logging is not enabled, Kodi filters everything up to NOTICE out
log_level = 'Info'
Expand Down

0 comments on commit 08a230f

Please sign in to comment.