コード例 #1
0
ファイル: index.php プロジェクト: rbroemeling/logviewer
		<div id="log_excerpt">
			<?php
				SkipWarning::reset();
				if (isset($log_set))
				{
					while ((LineOutput::$displayed_lines < MAX_LINES) && ($current_line = $log_set->gets()))
					{
						// If we have any filters, skip the lines that do not match them.
						if (
						    (! $current_line->matches_source_hosts()) ||
						    (! $current_line->matches_log_levels()) ||
						    (! $current_line->matches_log_facilities()) ||
						    (! $current_line->matches_filters())
						    )
						{
							SkipWarning::add();
							continue;
						}
	
						echo SkipWarning::warning(true);
						LineOutput::display($current_line);
					}
					echo SkipWarning::warning(true);
					if ((LineOutput::$displayed_lines == 0) && (SkipWarning::$total_skipped == 0))
					{
						echo "<div class='warning'>No log lines were found for the requested timeframe (" . strftime('%Y-%m-%d %H:%M:%S', $start_timestamp) . " thru " . strftime('%Y-%m-%d %H:%M:%S', $end_timestamp) . ').</div>';
					}
					elseif (LineOutput::$displayed_lines >= MAX_LINES)
					{
						echo "<div class='warning'>Encountered maximum line display limit of " . number_format(MAX_LINES) . " lines.</div>";
					}