summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-10 01:07:06 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-10 01:07:06 +0000
commite6869816c1a41df038cf2b747b33fe59b0629344 (patch)
tree31cb6d87062bb0938ef4ca4a84feb9e54b6eb1d2 /usr
parent530347edf413614d3846ad109fdfc89aa13893e2 (diff)
downloadpfsense-e6869816c1a41df038cf2b747b33fe59b0629344.zip
pfsense-e6869816c1a41df038cf2b747b33fe59b0629344.tar.gz
Correctly output correct number of records chosen on "pretty" rules mode
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/diag_logs_filter.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/local/www/diag_logs_filter.php b/usr/local/www/diag_logs_filter.php
index e84e0f1..f301389 100755
--- a/usr/local/www/diag_logs_filter.php
+++ b/usr/local/www/diag_logs_filter.php
@@ -48,7 +48,7 @@ function dump_clog($logfile, $tail, $withorig = true) {
$sor = isset($config['syslog']['reverse']) ? "-r" : "";
- exec("/usr/sbin/clog " . $logfile . " | tail {$sor} -n " . $tail, $logarr);
+ exec("/usr/sbin/clog " . $logfile . " | tail {$sor} -n " . "15000", $logarr);
foreach ($logarr as $logent) {
$logent = preg_split("/\s+/", $logent, 6);
@@ -80,6 +80,8 @@ function conv_clog($logfile, $tail) {
$filterlog = array();
+ $counter = 0;
+
foreach ($logarr as $logent) {
$dontdisplay = 0;
@@ -115,6 +117,9 @@ function conv_clog($logfile, $tail) {
if($dontdisplay == 0)
$filterlog[] = $flent;
+
+ if($counter > $nentries)
+ break;
}
return $filterlog;
OpenPOWER on IntegriCloud