aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2018-06-21 17:23:29 +0100
committerBryn M. Reeves <bmr@redhat.com>2018-06-21 17:23:29 +0100
commit5b5f41585e87fd9ea93092a07c69e4b05aaff96d (patch)
treef3ab466b4b2a0e46a56917ef88d38e93573de3e6
parentb5f02d7195e6b793bb6efc5a42941ad093a9d9a5 (diff)
downloadsos-5b5f41585e87fd9ea93092a07c69e4b05aaff96d.tar.gz
[logs] restore secure* and messages* log collection
Commit 5d25dd3 "fixed" a longstanding problem with the RedHatLogs plugin, in that the normal --all-logs behaviour (only collect the current log unless the option is given) is not respected for the messages and secure files. Based on feedback from contributors and support engineers this has now been reversed and all copies of these logs will now be included in reports by default again. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/logs.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/sos/plugins/logs.py b/sos/plugins/logs.py
index 56ec7b01..956faf67 100644
--- a/sos/plugins/logs.py
+++ b/sos/plugins/logs.py
@@ -78,12 +78,12 @@ class RedHatLogs(Logs, RedHatPlugin):
def setup(self):
super(RedHatLogs, self).setup()
- messages = "/var/log/messages"
- secure = "/var/log/secure"
-
- if self.get_option("all_logs"):
- messages += "*"
- secure += "*"
+ # NOTE: for historical reasons the 'messages' and 'secure' log
+ # paths for the RedHatLogs plugin do not obey the normal --all-logs
+ # convention. The rotated copies are collected unconditionally
+ # due to their frequent importance in diagnosing problems.
+ messages = "/var/log/messages*"
+ secure = "/var/log/secure*"
self.add_copy_spec(secure, sizelimit=self.limit)
self.add_copy_spec(messages, sizelimit=self.limit)