diff options
-rw-r--r-- | sos/sosreport.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sos/sosreport.py b/sos/sosreport.py index dd3a60c7..4f83a1ec 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -882,9 +882,7 @@ class SoSReport(object): ui_console.setLevel(logging.INFO) self.ui_log.addHandler(ui_console) - def _finish_logging(self): - logging.shutdown() - + def _add_sos_logs(self): # Make sure the log files are added before we remove the log # handlers. This prevents "No handlers could be found.." messages # from leaking to the console when running in --quiet mode when @@ -1479,7 +1477,7 @@ class SoSReport(object): # files are closed and cleaned up at exit. # # All subsequent terminal output must use print(). - self._finish_logging() + self._add_sos_logs() archive = None # archive path directory = None # report directory path (--build) @@ -1562,6 +1560,7 @@ class SoSReport(object): self.policy.display_results(archive, directory, checksum) # clean up + logging.shutdown() if self.tempfile_util: self.tempfile_util.clean() if self.tmpdir: |