Index: openacs.org-dev/packages/monitoring/www/startup-log.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/monitoring/www/startup-log.tcl,v diff -u -r1.1.1.1 -r1.1.1.2 --- openacs.org-dev/packages/monitoring/www/startup-log.tcl 9 Jul 2002 17:35:09 -0000 1.1.1.1 +++ openacs.org-dev/packages/monitoring/www/startup-log.tcl 8 Oct 2002 15:47:14 -0000 1.1.1.2 @@ -4,17 +4,17 @@ Displays a log (between the "AOLserver starting" and "AOLserver running" lines). @author Jon Salz (jsalz@mit.edu) - @cvs-id startup-log.tcl,v 3.2.2.2 2000/07/21 03:57:38 ron Exp + @cvs-id $Id$ } { { errors_only_p 1 } } set dimensional_list { { errors_only_p "Show:" 1 { - { 1 "Errors Only" } - { 0 "All Events" } - } + { 1 "Errors Only" } + { 0 "All Events" } + } } } @@ -43,23 +43,23 @@ # last "AOLserver/xxx starting" line. set offset [expr { $initial_error_log_length - 16384 }] if { $offset < 0 } { - set offset 0 + set offset 0 } set last_line $offset set start_offset $offset seek $error_log $offset start while { [gets $error_log line] >= 0 } { - if { [regexp {AOLserver/[^ ]+ starting} $line] } { - set start_offset $last_line - } - set last_line [tell $error_log] - if { $last_line > $initial_error_log_length } { - break - } + if { [regexp {AOLserver/[^ ]+ starting} $line] } { + set start_offset $last_line + } + set last_line [tell $error_log] + if { $last_line > $initial_error_log_length } { + break + } } - + nsv_set acs_properties error_log_start_offset $start_offset } @@ -68,26 +68,26 @@ set error_p 0 while { [gets $error_log line] >= 0 } { if { [regexp {^\[[^\]]+\]\[[^\]]+\]\[[^\]]+\] ([^:]+)} $line "" status] } { - if { [string equal $status "Warning"] || [string equal $status "Error"] } { - set error_p 1 - } else { - set error_p 0 - } + if { [string equal $status "Warning"] || [string equal $status "Error"] } { + set error_p 1 + } else { + set error_p 0 + } } if { $error_p } { - if { $errors_only_p } { - append out "[ns_quotehtml $line]\n" - } else { - append out "[ns_quotehtml $line]\n" - } + if { $errors_only_p } { + append out "[ns_quotehtml $line]\n" + } else { + append out "[ns_quotehtml $line]\n" + } } elseif { !$errors_only_p } { - append out "[ns_quotehtml $line]\n" + append out "[ns_quotehtml $line]\n" } if { [regexp {AOLserver/[^ ]+ running} $line] } { - break + break } if { [tell $error_log] > $error_log_length } { - break + break } } close $error_log