-echo "<H1><A NAME='LOGS'>4 - Log Files</A></H1>" >>$strfile
-
-echo "<H2><A NAME='access_log'>access_log</A></H2>" >>$strfile
-echo "<PRE>" >>$strfile
-sed -e '1,$s/&/&/g' -e '1,$s/</</g' $BASE/log/access_log >>$strfile
-echo "</PRE>" >>$strfile
-
-echo "<H2><A NAME='error_log'>error_log</A></H2>" >>$strfile
-echo "<PRE>" >>$strfile
-$GREP -v '^d' $BASE/log/error_log | sed -e '1,$s/&/&/g' -e '1,$s/</</g' >>$strfile
-echo "</PRE>" >>$strfile
-
-echo "<H2><A NAME='page_log'>page_log</A></H2>" >>$strfile
-echo "<PRE>" >>$strfile
-sed -e '1,$s/&/&/g' -e '1,$s/</</g' $BASE/log/page_log >>$strfile
-echo "</PRE>" >>$strfile
+echo " <h1><a name='LOGS'>4 - Log Files</a></h1>" >>$strfile
+
+for file in $BASE/log/*_log; do
+ baselog=`basename $file`
+
+ echo " <h2><a name=\"$baselog\">$baselog</a></h2>" >>$strfile
+ case $baselog in
+ error_log)
+ echo " <blockquote>Note: debug2 messages have been filtered out of the HTML report.</blockquote>" >>$strfile
+ echo " <pre>" >>$strfile
+ $GREP -v '^d' $BASE/log/error_log | sed -e '1,$s/&/&/g' -e '1,$s/</</g' >>$strfile
+ echo " </pre>" >>$strfile
+ ;;
+
+ *)
+ echo " <pre>" >>$strfile
+ sed -e '1,$s/&/&/g' -e '1,$s/</</g' $file >>$strfile
+ echo " </pre>" >>$strfile
+ ;;
+ esac
+done