From 835825dc6bdcd76a7dfd2f03cf2b497439cddd83 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Tue, 5 Dec 2017 11:01:34 -0800 Subject: [PATCH] [show]: If rotated syslog.1 file exists, concatenate output of syslog.1 and syslog (#159) --- show/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/show/main.py b/show/main.py index 3e735474d85d..df806923a95b 100755 --- a/show/main.py +++ b/show/main.py @@ -493,7 +493,10 @@ def logging(process, lines, follow): if follow: run_command("sudo tail -f /var/log/syslog") else: - command = "sudo cat /var/log/syslog" + if os.path.isfile("/var/log/syslog.1"): + command = "sudo cat /var/log/syslog.1 /var/log/syslog" + else: + command = "sudo cat /var/log/syslog" if process is not None: command += " | grep '{}'".format(process)