aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2018-06-21 12:29:13 +0100
committerBryn M. Reeves <bmr@redhat.com>2018-06-21 12:29:13 +0100
commit40295a36127915b344bbf0f69399a3739ab5e2cd (patch)
tree0df7bd6bb9f031c70abe8dc503f7120e7cf25a09
parentbfd1631524d5987f5aa692b00190aa5db3c2645c (diff)
downloadsos-40295a36127915b344bbf0f69399a3739ab5e2cd.tar.gz
[plugin] clean up journal log_size handling
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/__init__.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index 2920030f..16a6227e 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -834,13 +834,9 @@ class Plugin(object):
catalog_opt = " --catalog"
journal_size = 100
-
- sizelimit = sizelimit or self.get_option("log_size")
- if not sizelimit or int(sizelimit) < journal_size:
- sizelimit = journal_size
-
- if self.get_option('all_logs'):
- sizelimit = None
+ all_logs = self.get_option("all_logs")
+ log_size = sizelimit or self.get_option("log_size")
+ log_size = max(log_size, journal_size) if not all_logs else 0
if isinstance(units, six.string_types):
units = [units]