diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2017-10-20 16:45:47 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2017-10-20 16:45:47 +0100 |
commit | 156e39ddf0126d1dee75087f3bfbd898db8f4692 (patch) | |
tree | 688e9914bcd7ee6f02d7b6cc91cdf3d98da3fec3 | |
parent | 606962968c25b191af1906bf12f1f1290f879142 (diff) | |
download | sos-156e39ddf0126d1dee75087f3bfbd898db8f4692.tar.gz |
[ovirtimageio] add --all-logs support
Only collect logs by wildcard if --all-logs is given.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/ovirt_imageio.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sos/plugins/ovirt_imageio.py b/sos/plugins/ovirt_imageio.py index 42e14e1f..6c22bf20 100644 --- a/sos/plugins/ovirt_imageio.py +++ b/sos/plugins/ovirt_imageio.py @@ -34,6 +34,7 @@ class OvirtImageIO(Plugin, RedHatPlugin): def setup(self): self.limit = self.get_option('log_size') + all_logs = self.get_option('all_logs') # Add configuration files self.add_copy_spec([ @@ -41,11 +42,15 @@ class OvirtImageIO(Plugin, RedHatPlugin): '/etc/ovirt-imageio-proxy/ovirt-imageio-proxy.conf', ]) + if all_logs: + logs = ['/var/log/ovirt-imageio-proxy/image-proxy.log*', + '/var/log/ovirt-imageio-daemon/daemon.log*'] + else: + logs = ['/var/log/ovirt-imageio-proxy/image-proxy.log', + '/var/log/ovirt-imageio-daemon/daemon.log'] + # Add log files - self.add_copy_spec([ - '/var/log/ovirt-imageio-proxy/image-proxy.log*', - '/var/log/ovirt-imageio-daemon/daemon.log*', - ], sizelimit=self.limit) + self.add_copy_spec(logs, sizelimit=self.limit) # vim: expandtab tabstop=4 shiftwidth=4 |