summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNOYB <Al_Stu@Frontier.com>2015-12-12 00:19:10 -0800
committerNOYB <Al_Stu@Frontier.com>2015-12-12 00:19:10 -0800
commita0fdbd1d0f08e6b92d318ec5d2fe96018d271ba9 (patch)
treee566324875c2c8b8bce1fbd10d662ef9cdae0f0b
parent69522f45cf77f038c1a0f5b760b8e7ebce55306b (diff)
downloadpfsense-a0fdbd1d0f08e6b92d318ec5d2fe96018d271ba9.zip
pfsense-a0fdbd1d0f08e6b92d318ec5d2fe96018d271ba9.tar.gz
Tweak for correct var naming , so that:
process_pattern var actually holds the process pattern instead of the host name pattern. pid_pattern var actually holds the pid pattern instead of the process and pid patterns. No functional changes. Just good to have the var names reflect what they really hold.
-rw-r--r--src/etc/inc/filter_log.inc22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/etc/inc/filter_log.inc b/src/etc/inc/filter_log.inc
index fbf7c3b..6d4b866 100644
--- a/src/etc/inc/filter_log.inc
+++ b/src/etc/inc/filter_log.inc
@@ -113,11 +113,16 @@ function conv_log_filter($logfile, $nentries, $tail = 50, $filtertext = "", $fil
$date_pattern = "\(" . $month_pattern . "\ +" . $day_pattern . "\ +" . $time_pattern . "\)";
- $process_pattern = "\(.*?\)";
- $pid_pattern = "\(.*?\)\(?::\ +\)?\(?:\[[0-9:]*\]\)?:?";
+ $host_pattern = "\(.*?\)";
+# $host_pattern = "\([a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]\)";
+
+ $process_pattern = "\(.*?\)\(?::\ +\)?";
+ $pid_pattern = "\(?:\[[0-9:]*\]\)?:?";
+ $process_pid_pattern = $process_pattern . $pid_pattern;
+
$log_message_pattern = "\(.*\)";
- $pattern = "^" . $date_pattern . "\ +" . $process_pattern . "\ +" . $pid_pattern . "\ +" . $log_message_pattern . "$";
+ $pattern = "^" . $date_pattern . "\ +" . $host_pattern . "\ +" . $process_pid_pattern . "\ +" . $log_message_pattern . "$";
}
else if ($logfile_type == 'tbd') {
$pattern = "^\(.*\)$";
@@ -265,11 +270,16 @@ function parse_system_log_line($line) {
$date_pattern = "(" . $month_pattern . "\ +" . $day_pattern . "\ +" . $time_pattern . ")";
- $process_pattern = "(.*?)";
- $pid_pattern = "(.*?)(?::\ +)?(?:\[([0-9:]*)\])?:?";
+ $host_pattern = "(.*?)";
+# $host_pattern = "([a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])";
+
+ $process_pattern = "(.*?)(?::\ +)?";
+ $pid_pattern = "(?:\[([0-9:]*)\])?:?";
+ $process_pid_pattern = $process_pattern . $pid_pattern;
+
$log_message_pattern = "(.*)";
- $pattern = "/^" . $date_pattern . "\ +" . $process_pattern . "\ +" . $pid_pattern . "\ +" . $log_message_pattern . "$/";
+ $pattern = "/^" . $date_pattern . "\ +" . $host_pattern . "\ +" . $process_pid_pattern . "\ +" . $log_message_pattern . "$/";
if (!preg_match($pattern, $line, $log_split)) {
return "";
OpenPOWER on IntegriCloud