Skip to content
Snippets Groups Projects
Commit d8c8c18c authored by Carlos Vazquez Sierra's avatar Carlos Vazquez Sierra :eye_in_speech_bubble:
Browse files

Update SuppressLogMessages.py

parent 23467067
No related branches found
No related tags found
1 merge request!286Fix some compilation warnings when building StrippingCache and TurboCache
......@@ -3,3 +3,23 @@ from GaudiKernel.ProcessJobOptions import GetConsoleHandler
# Do not print any of the messages with level lower than WARNING
GetConsoleHandler().disable(allowed=logging.WARNING)
from Gaudi.Configuration import log
import re
IGNORED_MESSAGES = map(re.compile, (r'REMOVE UT decoding from DataOnDemand!',
r'Using default tag .* for partition .*',
r'something else configured a decoder already, .*',
r'Property .* is set in both .* and .*, using .*'))
_orig_log_filter = log.filter
def turbo_cache_filter(record):
'''
Hide known warnings in TurboCache.
'''
if record.levelno >= logging.WARNING:
if any(exp.search(record.msg) for exp in IGNORED_MESSAGES): return False
if not record.msg.strip(): return False # why should anyone want to print an empty warning?
return _orig_log_filter(record)
log.filter = turbo_cache_filter
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment