diff options
-rw-r--r-- | sos/plugins/__init__.py | 4 | ||||
-rw-r--r-- | sos/sosreport.py | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 048d2149..d930c9ef 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -140,8 +140,8 @@ class Plugin(object): self.must_exit = False - self.soslog = logging.getLogger('sos') - self.proflog = logging.getLogger('sosprofile') + self.soslog = self.cInfo['soslog'] + self.proflog = self.cInfo['proflog'] # get the option list into a dictionary for opt in self.optionList: diff --git a/sos/sosreport.py b/sos/sosreport.py index 1fd83efa..b8c216b4 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -229,6 +229,7 @@ class SoSReport(object): 'logdir': self.logdir, 'rptdir': self.rptdir, 'soslog': self.soslog, + 'proflog' : self.proflog, 'policy': self.policy, 'verbosity': self.opts.verbosity, 'xmlreport': self.xml_report, @@ -326,6 +327,7 @@ class SoSReport(object): console.setFormatter(logging.Formatter('%(message)s')) if self.opts.verbosity > 1: console.setLevel(logging.DEBUG) + flog.setLevel(logging.DEBUG) elif self.opts.verbosity > 0: console.setLevel(logging.INFO) else: @@ -357,6 +359,9 @@ class SoSReport(object): plog.setFormatter(logging.Formatter('%(message)s')) plog.setLevel(logging.DEBUG) self.proflog.addHandler(plog) + else: + self.proflog = logging.getLogger('sosprofile') + self.proflog.setLevel(logging.FATAL) def _finish_logging(self): logging.shutdown() |