0)) { $grep = "grep -ih"; if (($compress_archives == 'on') && glob($logfile . "*" . $compress_type) && $archives) { if($compress_type == 'bz2') { $grep = "bzgrep -ih"; } else { $grep = "zgrep -ih"; } } if (isset($filter) && $not) { $grepcmd = "$grep -v '$filter' $logfile"; } else { $grepcmd = "$grep '$filter' $logfile"; } if ($archives) { $grepcmd = $grepcmd . "*"; } $log_lines = trim(shell_exec("$grepcmd | wc -l")); $log_output = trim(shell_exec("$grepcmd | sort -M | tail -n $limit")); if (!empty($log_output)) { $log_messages = explode("\n", $log_output); $log_messages_count = sizeof($log_messages); } } $pgtitle = "Services: Syslog-ng Log Viewer"; include("head.inc"); ?>
Log File
Limit
Include Archives />
\n"; foreach($log_messages as $log_message) { echo "\n"; } } else { echo "\n"; } ?>
Showing $log_messages_count of $log_lines messages
$log_message
No log messages found or log file is empty.
Filter
Inverse Filter (NOT) />