From 67c0d0dcfdb80399a316eae4b4c3ebc898e2707c Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 17 Mar 2020 21:05:08 +0100 Subject: [PATCH] filter: diag_logs_filter_summary.php optionally support pid in log line filterlog: vs filterlog[XXX]: --- src/www/diag_logs_filter_summary.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/www/diag_logs_filter_summary.php b/src/www/diag_logs_filter_summary.php index 56bfd5c21..5a391ae89 100644 --- a/src/www/diag_logs_filter_summary.php +++ b/src/www/diag_logs_filter_summary.php @@ -65,7 +65,7 @@ function conv_log_filter($logfile, $nentries, $tail = 50, $filtertext = '', $fil /* Always do a reverse tail, to be sure we're grabbing the 'end' of the log. */ $logarr = []; - exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/grep 'filterlog:' | /usr/bin/tail -r -n {$tail}", $logarr); + exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/grep 'filterlog.*:' | /usr/bin/tail -r -n {$tail}", $logarr); $filterlog = array(); $counter = 0; @@ -151,7 +151,7 @@ function parse_filter_line($line, $interface_names = array()) $flent = array(); $log_split = ''; - if (!preg_match('/(.*)\s(.*)\sfilterlog:\s(.*)$/', $line, $log_split)) { + if (!preg_match('/(.*)\s(.*)\sfilterlog.*:\s(.*)$/', $line, $log_split)) { return ''; }