diff --git a/sos/component.py b/sos/component.py index dbc7336f57..6b99986b5d 100644 --- a/sos/component.py +++ b/sos/component.py @@ -202,7 +202,9 @@ def _setup_logging(self): else: console.setLevel(logging.WARNING) self.soslog.addHandler(console) - # log ERROR or higher logs to stderr instead + # still log ERROR level message to console, but only setup this handler + # when --quiet is used, as otherwise we'll double log + else: console_err = logging.StreamHandler(sys.stderr) console_err.setFormatter(logging.Formatter('%(message)s')) console_err.setLevel(logging.ERROR)