From a4f05925ee85cbeedc3b68f43becd45fa6237cdf Mon Sep 17 00:00:00 2001 From: tomeichlersmith Date: Tue, 17 Sep 2024 09:31:39 -0500 Subject: [PATCH] lower the level of the Process channel to info if a logFrequency is set this avoids tying together the event-status frequency from the overall terminal log level --- Framework/python/ldmxcfg.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Framework/python/ldmxcfg.py b/Framework/python/ldmxcfg.py index 8dcf7073c..f5e88c149 100644 --- a/Framework/python/ldmxcfg.py +++ b/Framework/python/ldmxcfg.py @@ -581,9 +581,6 @@ def __init__(self, passName): self.skimRules=[] self.logFrequency=-1 self.logger = Logger() - self.termLogLevel=2 #warnings and above - self.fileLogLevel=0 #print all messages - self.logFileName='' #won't setup log file self.compressionSetting=9 self.histogramFile='' self.conditionsGlobalTag='Default' @@ -604,6 +601,15 @@ def __setattr__(self, key, val): if key in logger_remap: setattr(self.logger, logger_remap[key], val) return + elif key == 'logFrequency' and val > 0: + # make sure the Process channel is lowered to info + # later log rules override earlier ones so we put this + # at the front of the list so the user could have overwritten + # this if need be + # 'Process' needs to match the name given in enableLogging + # in include/Framework/Process.h + self.logger.logRules.insert(0, _LogRule('Process', level=1)) + # fall through to set the key=val super().__setattr__(key, val)