diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-09-16 18:20:23 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-09-16 18:20:23 +0100 |
commit | f26c7cb829b42662d5d337f0ac892f1e5af1880e (patch) | |
tree | 2af7c9fdc35825eae5d09d8f671b40fb69b965fa | |
parent | 16c97796d3f6f5a9d09314229d7ab388b6918b2c (diff) | |
download | sos-f26c7cb829b42662d5d337f0ac892f1e5af1880e.tar.gz |
[logs] make journalctl log collection honour all_logs
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/logs.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sos/plugins/logs.py b/sos/plugins/logs.py index 574ca2eb..d5f33deb 100644 --- a/sos/plugins/logs.py +++ b/sos/plugins/logs.py @@ -68,7 +68,11 @@ class RedHatLogs(Logs, RedHatPlugin): days = int(self.get_option("log_days")) except: days = 3 - self.add_cmd_output('journalctl --all --since="-%ddays"' % days) + if self.get_option("all_logs"): + since_opt = "" + else: + since_opt = '--since="-%ddays"' % days + self.add_cmd_output('journalctl --all %s' % since_opt) class DebianLogs(Logs, DebianPlugin, UbuntuPlugin): |