Private GIT

Skip to content
Snippets Groups Projects
Commit d08d4017 authored by echel0n's avatar echel0n
Browse files

Fix for sickragetv/sickrage-issues#236

parent 885ef128
No related branches found
No related tags found
No related merge requests found
...@@ -51,8 +51,11 @@ class NullHandler(logging.Handler): ...@@ -51,8 +51,11 @@ class NullHandler(logging.Handler):
pass pass
class CensoredFormatter(logging.Formatter): class CensoredFormatter(logging.Formatter):
def __init__(self, *args, **kwargs):
super(CensoredFormatter, self).__init__(*args, **kwargs)
def format(self, record): def format(self, record):
msg = record.getMessage() msg = super(CensoredFormatter, self).format(record)
for k, v in censoredItems.items(): for k, v in censoredItems.items():
if v and len(v) > 0 and v in msg: if v and len(v) > 0 and v in msg:
msg = msg.replace(v, len(v) * '*') msg = msg.replace(v, len(v) * '*')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment