Filter out Cherrypy engine serving log message

This commit is contained in:
JonnyWong16 2020-10-10 10:05:06 -07:00
parent 1fd4ec3ca3
commit dd45b47032
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -74,6 +74,14 @@ def blacklist_config(config):
_BLACKLIST_WORDS.update(blacklist)
class CherrypyEngineFilter(logging.Filter):
"""
Log filter for the Cherrypy Engine serving message
"""
def filter(self, record):
return 'ENGINE Serving on' not in record.msg
class NoThreadFilter(logging.Filter):
"""
Log filter for the current thread
@ -344,6 +352,9 @@ def initLogger(console=False, log_dir=False, verbose=False):
handler.addFilter(EmailFilter())
handler.addFilter(PlexTokenFilter())
for handler in cherrypy.log.error_log.handlers:
handler.addFilter(CherrypyEngineFilter())
# Install exception hooks
initHooks()