diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2018-06-21 16:32:50 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-06-21 16:32:50 +0100 |
commit | ac6f0de011dd870da9c6f8cea4696ea2a0a18bdc (patch) | |
tree | 6092f7bb58e3f2a2426d53b6012bae1d176e42a9 | |
parent | 9742617247236bc0767549c4f9bf75cd576e3640 (diff) | |
download | sos-ac6f0de011dd870da9c6f8cea4696ea2a0a18bdc.tar.gz |
[sosreport] log preset options in command line notation
Instead of using the "name=value" pretty printer to format the
preset options for logging, use the SoSOptions.to_args() method
to convert them to a list of command line style arguments.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/sosreport.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sos/sosreport.py b/sos/sosreport.py index b37989b0..d6952d61 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -993,13 +993,14 @@ class SoSReport(object): self.soslog.info(msg % (__name__, "setup", " ".join(self._args))) # Log active preset defaults - msg = ("[%s:%s] using '%s' preset defaults" % - (__name__, "setup", self.preset.name)) + preset_args = self.preset.opts.to_args() + msg = ("[%s:%s] using '%s' preset defaults (%s)" % + (__name__, "setup", self.preset.name, " ".join(preset_args))) self.soslog.info(msg) # Log effective options after applying preset defaults self.soslog.info("[%s:%s] effective options now: %s" % - (__name__, "steup", str(self.opts))) + (__name__, "steup", " ".join(self.opts.to_args()))) self.ui_log.info(_(" Setting up plugins ...")) for plugname, plug in self.loaded_plugins: |