diff options
author | Erik Bernoth <ebernoth@redhat.com> | 2020-11-10 18:32:40 +0100 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-11-19 12:35:51 -0500 |
commit | 169898b47b26734a8cdcb748157f7314f7f8821b (patch) | |
tree | 693a3e3b4aeb2795ad3dcd1c73f75f9d952eb6c0 /sos.spec | |
parent | 7314865bab8569e2d6f64e0e30f4118c18bdc2f6 (diff) | |
download | sos-169898b47b26734a8cdcb748157f7314f7f8821b.tar.gz |
[component] Add log verbosity from presets
Closes: #2289
The main problem this tries to solve was that preset verbosity was
ignored in logging.
With a simple test this could be reproduced:
sudo sh -c "source /path/to/repo/sosreport/venv/bin/activate; \
cd /tmp/foo; sos report --preset sostestpreset; cd -"
The bug is that without a change of code there are no messages from the
plugin `host` (no lines of output start wiht "[plugin:host]").
The problem is that the logging is set in the inherited __init__() method
from Component, but the presets are only handled afterwards in the
Report's __init__().
Since it is good to have logging configured from the beginning, the
only option is to reconfigure it after the preset config is known.
The simplest method is to reinitialize the logging, although maybe not
the most efficient.
Signed-off-by: Erik Bernoth <ebernoth@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'sos.spec')
0 files changed, 0 insertions, 0 deletions