From 6dbd1d4abc9e64baa8f919c5bfb02ffc261512bb Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 4 Aug 2020 10:02:03 +0200 Subject: [PATCH] syslog ui: filter new style log directories accordingly. when using suricata, there already is a directory called suricata for example with a stats.log in it. we should only try to fetch files which match the pattern: /var/log/[app]/[component]/component_*.log /var/log/[component]/component_*.log --- src/opnsense/scripts/systemhealth/queryLog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/scripts/systemhealth/queryLog.py b/src/opnsense/scripts/systemhealth/queryLog.py index 75825216c..715aba4a5 100755 --- a/src/opnsense/scripts/systemhealth/queryLog.py +++ b/src/opnsense/scripts/systemhealth/queryLog.py @@ -64,7 +64,7 @@ if __name__ == '__main__': ) if os.path.isdir(log_basename): # new syslog-ng local targets use an extra directory level - for filename in sorted(glob.glob("%s/*.log" % log_basename), reverse=True): + for filename in sorted(glob.glob("%s/%s_*.log" % (log_basename, log_basename.split('/')[-1].split('.')[0])), reverse=True): log_filenames.append(filename) # legacy log output is always stiched last log_filenames.append("%s.log" % log_basename)