From f26c7cb829b42662d5d337f0ac892f1e5af1880e Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Tue, 16 Sep 2014 18:20:23 +0100 Subject: [logs] make journalctl log collection honour all_logs Signed-off-by: Bryn M. Reeves --- sos/plugins/logs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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): -- cgit