summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_logs_filter.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@sullrich-MacBookPro.local>2009-03-31 22:28:54 -0400
committerScott Ullrich <sullrich@sullrich-MacBookPro.local>2009-03-31 22:28:54 -0400
commit568f30c2f897bffd08df28abb74b74cc2d8be2ad (patch)
tree03e29b24c6e73cf37cbfe979538f79a1b491625e /usr/local/www/diag_logs_filter.php
parentb24358d1aceeca7846f8cb370ef22b9d11156011 (diff)
downloadpfsense-568f30c2f897bffd08df28abb74b74cc2d8be2ad.zip
pfsense-568f30c2f897bffd08df28abb74b74cc2d8be2ad.tar.gz
Switch back to clog but leave option to run fifolog.
Diffstat (limited to 'usr/local/www/diag_logs_filter.php')
-rwxr-xr-xusr/local/www/diag_logs_filter.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/usr/local/www/diag_logs_filter.php b/usr/local/www/diag_logs_filter.php
index b79106f..9b67549 100755
--- a/usr/local/www/diag_logs_filter.php
+++ b/usr/local/www/diag_logs_filter.php
@@ -56,16 +56,16 @@ if (!$nentries)
$nentries = 50;
if ($_POST['clear']) {
+ exec("/usr/bin/killall syslogd");
if(isset($config['system']['disablesyslogclog'])) {
unlink("/var/log/filter.log");
touch("/var/log/filter.log");
} else {
-// exec("killall syslogd");
-// sleep(1);
-// if(file_exists("{$filter_logfile}"))
-// unlink("{$filter_logfile}");
- exec("/usr/sbin/fifolog_create -s 511488 {$filter_logfile}");
- exec("/usr/bin/killall -HUP syslogd");
+ if(isset($config['system']['usefifolog'])) {
+ exec("/usr/sbin/fifolog_create -s 511488 {$filter_logfile}");
+ } else {
+ exec("/usr/sbin/clog -i -s 262144 {$filter_logfile}");
+ }
}
}
@@ -81,7 +81,10 @@ function conv_clog($logfile, $tail = 50) {
$sor = isset($config['syslog']['reverse']) ? "-r" : "";
- exec("/usr/sbin/fifolog_reader {$logfile} | /usr/bin/tail {$sor} -n 500", $logarr);
+ if(isset($config['system']['usefifolog']))
+ exec("/usr/sbin/fifolog_reader {$logfile} | /usr/bin/tail {$sor} -n 500", $logarr);
+ else
+ exec("/usr/sbin/clog {$logfile} | grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n 500", $logarr);
$filterlog = array();
OpenPOWER on IntegriCloud