Don't log plex tokens
This commit is contained in:
parent
0403e77021
commit
b9793a2e26
1 changed files with 2 additions and 1 deletions
|
@ -25,7 +25,6 @@ class LogHandler(logging.StreamHandler):
|
||||||
self.setFormatter(MyFormatter())
|
self.setFormatter(MyFormatter())
|
||||||
|
|
||||||
def emit(self, record):
|
def emit(self, record):
|
||||||
|
|
||||||
if self._get_log_level(record.levelno):
|
if self._get_log_level(record.levelno):
|
||||||
try:
|
try:
|
||||||
xbmc.log(self.format(record), level=xbmc.LOGNOTICE)
|
xbmc.log(self.format(record), level=xbmc.LOGNOTICE)
|
||||||
|
@ -67,6 +66,8 @@ class MyFormatter(logging.Formatter):
|
||||||
|
|
||||||
# Call the original formatter class to do the grunt work
|
# Call the original formatter class to do the grunt work
|
||||||
result = logging.Formatter.format(self, record)
|
result = logging.Formatter.format(self, record)
|
||||||
|
if window('pms_token'):
|
||||||
|
result = result.replace(window('pms_token'), '<PLEX-PMS-TOKEN>')
|
||||||
|
|
||||||
# Restore the original format configured by the user
|
# Restore the original format configured by the user
|
||||||
self._fmt = format_orig
|
self._fmt = format_orig
|
||||||
|
|
Loading…
Reference in a new issue