From 2d29214cd1d98b5f8fb0cea7be7824836ba977f0 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 11 Mar 2008 04:01:43 +0000 Subject: Allow clogging capabilities to be turned off. --- usr/local/www/guiconfig.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 8670874..2208f02 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -639,7 +639,10 @@ function dump_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinvert if(is_array($grepinvert)) foreach($grepinvert as $agrep) $grepline .= " | grep -v \"$agrep\""; - exec("/usr/sbin/clog {$logfile}{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n {$tail}", $logarr); + if($config['system']['disablesyslogclog']) + exec("cat {$logfile}{$grepline} | grep -v \"\033\" | /usr/bin/tail {$sor} -n {$tail}", $logarr); + else + exec("/usr/sbin/clog {$logfile}{$grepline} | grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n {$tail}", $logarr); /* comment out debug code echo ""; */ @@ -672,7 +675,10 @@ function return_clog($logfile, $tail, $grepfor = "", $grepinvert = "", $grepreve /* comment out debug code echo ""; */ - exec("/usr/sbin/clog {$logfile}{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n {$tail}", $logarr); + if($config['system']['disablesyslogclog']) + exec("cat {$logfile}{$grepline} | grep -v \"\033\" | /usr/bin/tail {$sor} -n {$tail}", $logarr); + else + exec("/usr/sbin/clog {$logfile}{$grepline} | grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n {$tail}", $logarr); return($logarr); } @@ -823,5 +829,4 @@ function display_widget_tabs(& $tab_array) { echo ""; } - ?> \ No newline at end of file -- cgit v1.1