mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Disable logging while library update in progress
This commit is contained in:
parent
4e0f06f24d
commit
5faf357045
2 changed files with 26 additions and 3 deletions
|
@ -51,6 +51,17 @@ class LogListHandler(logging.Handler):
|
|||
plexpy.LOG_LIST.insert(0, (helpers.now(), message, record.levelname, record.threadName))
|
||||
|
||||
|
||||
class NoThreadFilter(logging.Filter):
|
||||
"""
|
||||
Log filter for the current thread
|
||||
"""
|
||||
def __init__(self, threadName):
|
||||
self.threadName = threadName
|
||||
|
||||
def filter(self, record):
|
||||
return not record.threadName == self.threadName
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def listener():
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue