From 40295a36127915b344bbf0f69399a3739ab5e2cd Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Thu, 21 Jun 2018 12:29:13 +0100 Subject: [plugin] clean up journal log_size handling Signed-off-by: Bryn M. Reeves --- sos/plugins/__init__.py | 10 +++------- 1 file 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] -- cgit