diff --git a/html/ops/show_log.php b/html/ops/show_log.php index 7e097fba1b..55ac761863 100644 --- a/html/ops/show_log.php +++ b/html/ops/show_log.php @@ -13,6 +13,7 @@ $f = $_GET["f"]; $s = $_GET["s"]; + $l = (int)$_GET["l"]; if (!$f || !preg_match("/^ *([a-z_*]+[.](log|out) *)+$/", $f)) { $f = '*.log'; @@ -27,11 +28,12 @@ echo "
"; echo 'Hint: Example greps: "RESULT#106876", "26fe99aa_25636_00119.wu_1", "WU#8152", "too many errors", "2003-07-17", "CRITICAL""; } while () { chomp; if (/$s/) { if ($ARGV ne $prev_file) { + finish_printlines(); $prev_file = $ARGV; if ($html) { print "
"; } else { print "\n\n$ARGV:\n"; } + $nlines = 0; } my $n = sprintf("%05d", $.); + if ($html) { s%.*debug.*%$&%i; s%.*(critical|error).*%$&%i; s%$s%$&%g if $s; - print "$n $_\n"; + printline "$n $_\n"; } else { - print " $n: $_\n"; + printline " $n: $_\n"; } } } +finish_printlines(); if ($html) { print ""; } diff --git a/sched/main.C b/sched/main.C index ede37d9302..c93eedf360 100644 --- a/sched/main.C +++ b/sched/main.C @@ -48,7 +48,7 @@ static const char* STDERR_FILENAME = "../log/cgi.log"; #define REQ_FILE_PREFIX "boinc_req_" #define REPLY_FILE_PREFIX "boinc_reply_" -bool use_files = true; // use disk files for req/reply msgs (for debugging) +bool use_files = false; // use disk files for req/reply msgs (for debugging) DB_PROJECT gproject; CONFIG config;