diff options
-rw-r--r-- | sos/plugins/openstack_swift.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sos/plugins/openstack_swift.py b/sos/plugins/openstack_swift.py index 0f04533e..3d38a42b 100644 --- a/sos/plugins/openstack_swift.py +++ b/sos/plugins/openstack_swift.py @@ -25,11 +25,17 @@ class OpenStackSwift(Plugin): plugin_name = "openstack_swift" profiles = ('openstack', 'openstack_controller') - option_list = [("log", "gathers openstack-swift logs", "slow", False)] + option_list = [] def setup(self): - if self.get_option("log"): - self.add_copy_spec("/var/log/swift/") + + self.limit = self.get_option("log_size") + if self.get_option("all_logs"): + self.add_copy_spec_limit("/var/log/swift/", + sizelimit=self.limit) + else: + self.add_copy_spec_limit("/var/log/swift/*.log", + sizelimit=self.limit) self.add_copy_spec("/etc/swift/") |