Index: /trunk/gsdl/bin/script/build
===================================================================
--- /trunk/gsdl/bin/script/build	(revision 2784)
+++ /trunk/gsdl/bin/script/build	(revision 2785)
@@ -132,5 +132,18 @@
 &main();
 
-close OUT if $use_out;
+if ($use_out) {
+    close OUT;
+
+    # if we've created a build log we'll copy it to the collection's etc
+    # directory
+    my ($etcdir);
+    if ($dontinstall) {
+	$etcdir = &util::filename_cat($collectdir, "etc", "build.log");
+    } else {
+	$etcdir = &util::filename_cat($ENV{'GSDLHOME'}, "collect", $collection, "etc", "build.log");
+    }
+    
+    &util::cp($outfile, $etcdir);
+}
 
 sub print_usage {
@@ -168,4 +181,6 @@
     print STDOUT "   -out                    Filename or handle to print output status to.\n";
     print STDOUT "                           The default is STDERR\n";
+    print STDOUT "   -statsfile name         Filename or handle to print import statistics to.\n";
+    print STDOUT "                           The default is STDERR\n";
     print STDOUT "   -make_writable          If set build will make the collection and any\n";
     print STDOUT "                           temporary files it created globally writable after\n";
@@ -373,5 +388,9 @@
     $import_cmd .= " -removeold" unless $append;
     $import_cmd .= " -collectdir \"$collectdir\"" if $collectdir =~ /\w/;
+    $import_cmd .= " -statsfile \"$statsfile\"" if $statsfile =~ /\w/;
     $import_cmd .= " $maxdocs $collection";
+
+    print STDERR "\n**import_cmd: $import_cmd\n";
+
     system ($import_cmd);
     # if using output directory append the import output to it
@@ -558,4 +577,5 @@
 			 'email_events/.*/', \$email_events,
 			 'mail_server/.*/', \$mail_server,
+			 'statsfile/.*/STDERR', \$statsfile,
 			 'event_header/.*/', \$event_header)) {
 	
Index: /trunk/gsdl/bin/script/buildcol.pl
===================================================================
--- /trunk/gsdl/bin/script/buildcol.pl	(revision 2784)
+++ /trunk/gsdl/bin/script/buildcol.pl	(revision 2785)
@@ -76,4 +76,8 @@
     print STDOUT "   -no_strip_html        Do not strip the html tags from the indexed text\n";
     print STDOUT "                         (only used for mgpp collections).\n\n";
+    print STDOUT "   -faillog name         Fail log filename. This log receives the filenames\n";
+    print STDOUT "                         of any files which fail to be processed (defaults.\n";
+    print STDOUT "                         to " . 
+	&util::filename_cat("<collectdir>", "colname", "etc", "fail.log") . ")\n";
     print STDOUT "  [Type \"perl -S buildcol.pl | more\" if this help text scrolled off your screen]";
     print STDOUT "\n" unless $ENV{'GSDLOS'} =~ /^windows$/i;
@@ -86,5 +90,5 @@
 	$debug, $mode, $indexname, $keepold, $allclassifications,
 	$create_images, $collectdir, $out, $buildtype, $textindex,
-	$no_strip_html, $no_text);
+	$no_strip_html, $no_text, $faillog);
 
     # note that no defaults are passed for most options as they're set
@@ -106,5 +110,6 @@
 			 'out/.*/STDERR', \$out,
 			 'no_strip_html', \$no_strip_html,
-			 'buildtype/^(mg|mgpp)$/', \$buildtype)) {
+			 'buildtype/^(mg|mgpp)$/', \$buildtype,
+			 'faillog/.*/', \$faillog)) {
 	&print_usage();
 	die "\n";
@@ -125,4 +130,14 @@
 	die "\n";
     }
+
+    if ($faillog eq "") {
+	$faillog = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, "etc", "fail.log");
+    }
+    # note that we're appending to the faillog here (import.pl clears it each time)
+    # this could potentially create a situation where the faillog keeps being added 
+    # to over multiple builds (if the import process is being skipped)
+    open (FAILLOG, ">>$faillog") || die "Couldn't open fail log $faillog\n";
+    $faillog = 'buildcol::FAILLOG';
+    $faillog->autoflush(1);
 
     # read the configuration file
@@ -268,5 +283,5 @@
 	 "\$realarchivedir, \$realbuilddir, \$verbosity, " .
 	 "\$maxdocs, \$debug, \$keepold, \$allclassifications, " .
-	 "\$out, \$no_text)");
+	 "\$out, \$no_text, \$faillog)");
     die "$@" if $@;
 
@@ -301,4 +316,5 @@
 
     close OUT if $close_out;
+    close FAILLOG;
 }
 
Index: /trunk/gsdl/bin/script/classinfo.pl
===================================================================
--- /trunk/gsdl/bin/script/classinfo.pl	(revision 2784)
+++ /trunk/gsdl/bin/script/classinfo.pl	(revision 2785)
@@ -35,5 +35,4 @@
 }
 
-use strict;
 use classify;
 use util;
Index: /trunk/gsdl/bin/script/import.pl
===================================================================
--- /trunk/gsdl/bin/script/import.pl	(revision 2784)
+++ /trunk/gsdl/bin/script/import.pl	(revision 2785)
@@ -81,6 +81,11 @@
 	&util::filename_cat ($ENV{'GSDLHOME'}, "collect") . ")\n";
     print STDOUT "   -out name              Filename or handle to print output status to.\n";
-    print STDOUT "   -faillog name          Filename to log import failures to.\n";
-    print STDOUT "                          The default is <collectdir>/colname/etc/fail.log\n\n";
+    print STDOUT "                          The default is STDERR\n";
+    print STDOUT "   -statsfile name        Filename or handle to print import statistics to.\n";
+    print STDOUT "                          The default is STDERR\n";
+    print STDOUT "   -faillog name          Fail log filename. This log receives the filenames\n";
+    print STDOUT "                          of any files which fail to be processed (defaults.\n";
+    print STDOUT "                          to " . 
+	&util::filename_cat("<collectdir>", "colname", "etc", "fail.log") . ")\n";
     print STDOUT "  [Type \"perl -S import.pl | more\" if this help text scrolled off your screen]";
     print STDOUT "\n" unless $ENV{'GSDLOS'} =~ /^windows$/i;
@@ -93,6 +98,6 @@
 	$removeold, $gzip, $groupsize, $OIDtype, $debug, 
 	$maxdocs, $collection, $configfilename, $collectcfg, 
-	$pluginfo, $sortmeta, $archive_info_filename, 
-	$archive_info, $processor, $out, $faillogname, $collectdir);
+	$pluginfo, $sortmeta, $archive_info_filename, $statsfile,
+	$archive_info, $processor, $out, $faillog, $collectdir);
 
     # note that no defaults are passed for most options as they're set
@@ -112,5 +117,6 @@
 			 'collectdir/.*/', \$collectdir,
 			 'out/.*/STDERR', \$out,
-			 'faillog/.*/', \$faillogname)) {
+			 'statsfile/.*/STDERR', \$statsfile,
+			 'faillog/.*/', \$faillog)) {
 	&print_usage();
 	die "\n";
@@ -133,28 +139,11 @@
 	die "\n";
     }
-    
-    # check and/or set fail log file
-    if ($faillogname eq "") { 
-	$faillogname="$ENV{GSDLCOLLECTDIR}/etc/fail.log";
-    } else {
-	my $can_open=1;
-	open (TESTOPEN, ">$faillogname") || ($can_open=0);
-	close (TESTOPEN);
-	if ($can_open==0) {
-	    warn "fail.log - cannot write to \"$faillogname\", using default\n \"$ENV{GSDLCOLLECTDIR}/etc/fail.log\" instead.\n";
-	    $faillogname="$ENV{GSDLCOLLECTDIR}/etc/fail.log";
-	}
-    }
-    # test that default is writable...
-    if ($faillogname eq "$ENV{GSDLCOLLECTDIR}/etc/fail.log") {
-	my $can_open=1;
-	open (TESTOPEN, ">$faillogname") || ($can_open=0);
-	close (TESTOPEN);
-	if ($can_open==0) {
-	    warn "warning - cannot write to \"$faillogname\".\n";
-	    $faillogname="";
-	}
-    }
-
+
+    if ($faillog eq "") {
+	$faillog = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, "etc", "fail.log");
+    }
+    open (FAILLOG, ">$faillog") || die "Couldn't open fail log $faillog\n";
+    $faillog = 'import::FAILLOG';
+    $faillog->autoflush(1);
 
     # check sortmeta
@@ -256,5 +245,5 @@
 
     # load all the plugins
-    $pluginfo = &plugin::load_plugins ($plugins, $verbosity, $out, $faillogname);
+    $pluginfo = &plugin::load_plugins ($plugins, $verbosity, $out, $faillog);
     if (scalar(@$pluginfo) == 0) {
 	print $out "No plugins were loaded.\n";
@@ -290,5 +279,5 @@
     
     &plugin::end($pluginfo, $processor);
-    
+
     # write out the archive information file
     if (!$debug) {
@@ -296,4 +285,30 @@
 	$archive_info->save_info($archive_info_filename);
     }
+    
+    # write out import stats
+    my $close_stats = 0;
+    if ($statsfile !~ /^(STDERR|STDOUT)$/i) {
+	if (open (STATS, ">$statsfile")) {
+	    $statsfile = 'import::STATS';
+	    $close_stats = 1;
+	} else {
+	    print $out "WARNING: couldn't open stats file $statsfile\n";
+	    print $out "         will print stats to STDERR instead\n";
+	    $statsfile = 'STDERR';
+	}
+    }
+
+    print $out "\n";
+    print $out "*********************************************\n";
+    print $out "Import Complete\n";
+    print $out "*********************************************\n";
+
+    &plugin::write_stats($pluginfo, $statsfile);
+    if ($close_stats) {
+	close STATS;
+    }
+
     close OUT if $close_out;
+    close FAILLOG;
 }
+
Index: /trunk/gsdl/bin/script/mirror.pl
===================================================================
--- /trunk/gsdl/bin/script/mirror.pl	(revision 2784)
+++ /trunk/gsdl/bin/script/mirror.pl	(revision 2785)
@@ -48,5 +48,4 @@
 }
 
-use strict;
 use arcinfo;
 use colcfg;
Index: /trunk/gsdl/bin/script/nightly.pl
===================================================================
--- /trunk/gsdl/bin/script/nightly.pl	(revision 2784)
+++ /trunk/gsdl/bin/script/nightly.pl	(revision 2785)
@@ -41,5 +41,4 @@
 }
 
-use strict;
 use arcinfo;
 use colcfg;
Index: /trunk/gsdl/bin/script/pluginfo.pl
===================================================================
--- /trunk/gsdl/bin/script/pluginfo.pl	(revision 2784)
+++ /trunk/gsdl/bin/script/pluginfo.pl	(revision 2785)
@@ -36,5 +36,4 @@
 }
 
-use strict;
 use plugin;
 use util;
Index: /trunk/gsdl/bin/script/update.pl
===================================================================
--- /trunk/gsdl/bin/script/update.pl	(revision 2784)
+++ /trunk/gsdl/bin/script/update.pl	(revision 2785)
@@ -46,5 +46,4 @@
 }
 
-use strict;
 use arcinfo;
 use colcfg;
Index: /trunk/gsdl/etc/main.cfg
===================================================================
--- /trunk/gsdl/etc/main.cfg	(revision 2784)
+++ /trunk/gsdl/etc/main.cfg	(revision 2785)
@@ -74,6 +74,5 @@
                 spanish.dm dutch.dm port.dm russian.dm russian2.dm \
                 italian.dm italian2.dm home.dm collect.dm docs.dm \
-                hebrew.dm
-
+                hebrew.dm bsummary.dm
 
 # Define the interface languages and encodings supported by this receptionist
Index: /trunk/gsdl/macros/bsummary.dm
===================================================================
--- /trunk/gsdl/macros/bsummary.dm	(revision 2785)
+++ /trunk/gsdl/macros/bsummary.dm	(revision 2785)
@@ -0,0 +1,16 @@
+package bsummary
+
+_pagetitle_ {_collectionname_}
+
+_content_ {
+<center>
+_navigationbar_
+<h3>_textbsummary_</h3>
+</center>
+<p>_importlog_
+
+<center>
+<h3>_textflog_</h3>
+</center>
+<p>_faillog_
+}
Index: /trunk/gsdl/macros/collect.dm
===================================================================
--- /trunk/gsdl/macros/collect.dm	(revision 2784)
+++ /trunk/gsdl/macros/collect.dm	(revision 2785)
@@ -715,4 +715,6 @@
 <p>_textbildsuc_
 
+<p>_textviewbildsummary_
+
 <p><center>
 _collectorbar_
Index: /trunk/gsdl/macros/english.dm
===================================================================
--- /trunk/gsdl/macros/english.dm	(revision 2784)
+++ /trunk/gsdl/macros/english.dm	(revision 2785)
@@ -62,4 +62,5 @@
 _collectorextra_ {
 <p>This collection contains _numdocs_ _If_("_numdocs_" eq "1",document,documents), a total of _numbytes_.
+<p><a href="_httppagex_(bsummary)">Click here</a> to view the build summary for this collection.
 }
 
Index: /trunk/gsdl/macros/english2.dm
===================================================================
--- /trunk/gsdl/macros/english2.dm	(revision 2784)
+++ /trunk/gsdl/macros/english2.dm	(revision 2785)
@@ -470,4 +470,9 @@
 _textseconds_ {seconds}
 _textbildsuc_ {Collection built successfully.}
+
+_textviewbildsummary_ {
+You may <a href="_httppagex_(bsummary)&c=_cgiargbc1dirname_" target=_top>view the build
+summary</a> of this collection for further details.
+}
 
 _textfailmsg11_ {
@@ -917,2 +922,17 @@
 _textmus_ {main.cfg updated successfully}
 
+
+######################################################################
+# 'bsummary' pages
+package bsummary
+######################################################################
+
+
+#------------------------------------------------------------
+# text macros
+#------------------------------------------------------------
+
+_textbsummary_ {Build summary for _collectionname_ collection}
+_textflog_ {Fail log for _collectionname_ collection}
+
+
Index: /trunk/gsdl/perllib/acronym.pm
===================================================================
--- /trunk/gsdl/perllib/acronym.pm	(revision 2784)
+++ /trunk/gsdl/perllib/acronym.pm	(revision 2785)
@@ -26,5 +26,4 @@
 ###########################################################################
 
-use strict;
 use diagnostics;
 
Index: /trunk/gsdl/perllib/mgbuilder.pm
===================================================================
--- /trunk/gsdl/perllib/mgbuilder.pm	(revision 2784)
+++ /trunk/gsdl/perllib/mgbuilder.pm	(revision 2785)
@@ -62,8 +62,9 @@
     my ($class, $collection, $source_dir, $build_dir, $verbosity, 
 	$maxdocs, $debug, $keepold, $allclassifications, 
-	$outhandle, $no_text) = @_;
+	$outhandle, $no_text, $failhandle) = @_;
 
     $outhandle = STDERR unless defined $outhandle;
     $no_text = 0 unless defined $no_text;
+    $failhandle = STDERR unless defined $failhandle;
 
     # create an mgbuilder object
@@ -78,4 +79,5 @@
 		      'outhandle'=>$outhandle,
 		      'no_text'=>$no_text,
+		      'failhandle'=>$failhandle,
 		      'notbuilt'=>[]    # indexes not built
 		      }, $class;
@@ -134,5 +136,5 @@
     
     # load all the plugins
-    $self->{'pluginfo'} = &plugin::load_plugins ($plugins, $verbosity, $outhandle);
+    $self->{'pluginfo'} = &plugin::load_plugins ($plugins, $verbosity, $outhandle, $failhandle);
     if (scalar(@{$self->{'pluginfo'}}) == 0) {
 	print $outhandle "No plugins were loaded.\n";
Index: /trunk/gsdl/perllib/plugin.pm
===================================================================
--- /trunk/gsdl/perllib/plugin.pm	(revision 2784)
+++ /trunk/gsdl/perllib/plugin.pm	(revision 2785)
@@ -28,11 +28,18 @@
 require util;
 
+my $stats = {'num_processed' => 0,
+	     'num_blocked' => 0,
+	     'num_not_processed' => 0,
+	     'num_archives' => 0
+	     };
+
 sub load_plugins {
     my ($plugin_list) = shift @_;
-    ($verbosity, $outhandle, $faillogname) = @_; # globals
+    ($verbosity, $outhandle, $failhandle) = @_; # globals
     my @plugin_objects = ();
 
     $verbosity = 2 unless defined $verbosity;
     $outhandle = STDERR unless defined $outhandle;
+    $failhandle = STDERR unless defined $failhandle;
 
     foreach $pluginoptions (@$plugin_list) {
@@ -58,5 +65,5 @@
 	
 	# initialize plugin
-	$plugobj->init($verbosity, $outhandle, $faillogname);
+	$plugobj->init($verbosity, $outhandle, $failhandle);
 
 	# add this object to the list
@@ -94,10 +101,52 @@
 	return $rv if defined $rv;
     }
+
+    if ($verbosity >= 2) {
+	print $outhandle "WARNING - no plugin could process $file\n";
+    }
     
-    if ($verbosity >= 2) {
-	print $outhandle "WARNING - no plugin could process " . 
-	    &util::filename_cat($base_dir,$file) . "\n";
+    $file =~ s/([^\\\/]+)$/$1/;
+    print $failhandle "$file: no plugin could process this file\n";
+    $stats->{'num_not_processed'} ++;
+
+    return 0;
+}
+
+# write out some general stats that the plugins have compiled - note that
+# the buildcol.pl process doesn't currently call this process so the stats
+# are only output after import.pl -
+sub write_stats {
+    my ($pluginfo, $statshandle) = @_;
+
+    foreach $plugobj (@$pluginfo) {
+	$plugobj->compile_stats($stats);
     }
-    return 0;
+
+    my $total = $stats->{'num_processed'} + $stats->{'num_blocked'} + 
+	$stats->{'num_not_processed'};
+
+    if ($total == 1) {
+	print $statshandle "* 1 document was considered for processing\n";
+    } else {
+	print $statshandle "* $total documents were considered for processing\n";
+    }
+    if ($stats->{'num_archives'}) {
+	print $statshandle "   (including the contents of " . $stats->{'num_archives'} .
+	    " ZIP/TAR archive";
+	if ($stats->{'num_archives'} == 1) {print $statshandle ")\n";}
+	else {print $statshandle "s)\n";}
+    }
+    if ($stats->{'num_processed'} == 1) {
+	print $statshandle "* 1 was processed and included in the collection\n";
+    } else {
+	print $statshandle "* " . $stats->{'num_processed'} . " were processed and included in the collection\n";
+    }
+    if ($stats->{'num_not_processed'} == 1) {
+	print $statshandle "* 1 was rejected.";
+    } else {
+	print $statshandle "* " . $stats->{'num_not_processed'} . " were rejected.";
+    } 
+    print $statshandle " See the fail log for a list of rejected documents\n";
+    
 }
 
Index: /trunk/gsdl/perllib/plugins/BasPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/BasPlug.pm	(revision 2784)
+++ /trunk/gsdl/perllib/plugins/BasPlug.pm	(revision 2785)
@@ -142,4 +142,9 @@
 
     $self->{'textcat'} = new textcat();
+
+    $self->{'num_processed'} = 0;
+    $self->{'num_not_processed'} = 0;
+    $self->{'num_blocked'} = 0;
+    $self->{'num_archives'} = 0;
     
     # general options available to all plugins
@@ -175,12 +180,12 @@
 sub init {
     my $self = shift (@_);
-    my ($verbosity, $outhandle, $faillogname) = @_;
+    my ($verbosity, $outhandle, $failhandle) = @_;
 
     # verbosity is passed through from the processor
     $self->{'verbosity'} = $verbosity;
 
-    # as is the outhandle ...
+    # as are the outhandle and failhandle
     $self->{'outhandle'} = $outhandle if defined $outhandle;
-    $self->{'faillogname'} = $faillogname;
+    $self->{'failhandle'} = $failhandle;
 
     # set process_exp and block_exp to defaults unless they were
@@ -258,5 +263,8 @@
 
     my $filename = &util::filename_cat($base_dir, $file);
-    return 0 if $self->{'block_exp'} ne "" && $filename =~ /$self->{'block_exp'}/;
+    if ($self->{'block_exp'} ne "" && $filename =~ /$self->{'block_exp'}/) {
+	$self->{'num_blocked'} ++;
+	return 0;
+    }
     if ($filename !~ /$self->{'process_exp'}/ || !-f $filename) {
 	return undef;
@@ -298,4 +306,9 @@
     if (!length ($text)) {
 	print $outhandle "$plugin_name: ERROR: $file contains no text\n" if $self->{'verbosity'};
+
+	my $failhandle = $self->{'failhandle'};
+	print $failhandle "$file: " . ref($self) . ": file contains no text\n";
+	$self->{'num_not_processed'} ++;
+
 	return 0;
     }
@@ -316,4 +329,6 @@
     # process the document
     $processor->process($doc_obj);
+
+    $self->{'num_processed'} ++;
 
     return 1; # processed the file
@@ -671,3 +686,13 @@
 }
 
+sub compile_stats {
+    my $self = shift(@_);
+    my ($stats) = @_;
+
+    $stats->{'num_processed'} += $self->{'num_processed'};
+    $stats->{'num_not_processed'} += $self->{'num_not_processed'};
+
+}
+
+
 1;
Index: /trunk/gsdl/perllib/plugins/ConvertToPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/ConvertToPlug.pm	(revision 2784)
+++ /trunk/gsdl/perllib/plugins/ConvertToPlug.pm	(revision 2785)
@@ -48,6 +48,4 @@
 #    @ISA = ('BasPlug'); #, 'HTMLPlug', 'TEXTPlug');
 }
-
-# use strict;  # this breaks 'print $outhandle ' error msgs.
 
 sub print_usage {
@@ -146,4 +144,5 @@
     my $outhandle = $self->{'outhandle'};
     my $convert_to = $self->{'convert_to'};
+    my $failhandle = $self->{'failhandle'};
 
     # softlink to collection tmp dir
@@ -184,14 +183,13 @@
     if ($output_type eq "fail") {
 	print $outhandle "Could not convert $tailname$suffix to $convert_to format\n";
-	if ($self->{'faillogname'} ne "" && -s "$errlog") {
-	    open(SAVELOG, ">>$self->{'faillogname'}");
+	print $failhandle "$tailname$suffix: " . ref($self) . " failed to convert to $convert_to\n";
+	$self->{'num_not_processed'} ++;
+	if (-s "$errlog") {
 	    open(ERRLOG, "$errlog");
-	    print SAVELOG "$tailname$suffix (converting to $convert_to) failed:\n";
 	    while (<ERRLOG>) {
-		print SAVELOG "$_";
+		print $outhandle "$_";
 	    }
+	    print $outhandle "\n";
 	    close ERRLOG;
-	    print SAVELOG "\n";
-	    close SAVELOG;
 	}
 	&util::rm("$errlog") if (-e "$errlog");
@@ -236,5 +234,8 @@
 
     my $filename = &util::filename_cat($base_dir, $file);
-    return 0 if $self->{'block_exp'} ne "" && $filename =~ /$self->{'block_exp'}/;
+    if ($self->{'block_exp'} ne "" && $filename =~ /$self->{'block_exp'}/) {
+	$self->{'num_blocked'} ++;
+	return 0;
+    }
     if ($filename !~ /$self->{'process_exp'}/ || !-f $filename) {
         return undef;
@@ -299,4 +300,5 @@
     $self->cleanup_tmp_area();
 
+    $self->{'num_processed'} ++;
 
     return 1;
Index: /trunk/gsdl/perllib/plugins/PDFPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/PDFPlug.pm	(revision 2784)
+++ /trunk/gsdl/perllib/plugins/PDFPlug.pm	(revision 2785)
@@ -63,5 +63,5 @@
 
     my $outhandle = $self->{'outhandle'};
-    print $outhandle "PDFPlug: passing $_[3] onto $self->{'convert_to'} Plug\n" 
+    print $outhandle "PDFPlug: passing $_[3] on to $self->{'convert_to'}Plug\n" 
 	if $self->{'verbosity'} > 1;
     
@@ -69,8 +69,3 @@
 }
 
-
 1;
-
-
-
-
Index: /trunk/gsdl/perllib/plugins/PSPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/PSPlug.pm	(revision 2784)
+++ /trunk/gsdl/perllib/plugins/PSPlug.pm	(revision 2785)
@@ -33,7 +33,4 @@
 }
 
-use strict;
-
-
 sub new {
     my $class = shift (@_);
@@ -65,5 +62,4 @@
     print STDERR "using the PRESCRIPT package, which is available for download at\n   http://www.nzdl.org/html/software.html\n\n";
 }
-
 
 sub get_default_block_exp {
@@ -147,5 +143,4 @@
 }
 
-
 # do plugin specific processing of doc_obj for HTML type
 sub process {
@@ -153,5 +148,6 @@
     my ($trash, $trash2, $path, $file, $trash3, $doc) = @_;
 
-    print STDERR "PSPlug: passing $_[3] onto $self->{'convert_to'} Plug\n" 
+    my $outhandle = $self->{'outhandle'};
+    print $outhandle "PSPlug: passing $_[3] on to $self->{'convert_to'}Plug\n" 
 	if $self->{'verbosity'} > 1;
     
Index: /trunk/gsdl/perllib/plugins/RTFPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/RTFPlug.pm	(revision 2784)
+++ /trunk/gsdl/perllib/plugins/RTFPlug.pm	(revision 2785)
@@ -33,6 +33,4 @@
 }
 
-use strict;
-
 sub get_default_process_exp {
     my $self = shift (@_);
@@ -42,6 +40,9 @@
 sub process {
     my $self = shift (@_);
-    print STDERR "RTFPlug: passing $_[3] onto $self->{'convert_to'} Plug\n" 
+
+    my $outhandle = $self->{'outhandle'};
+    print $outhandle "RTFPlug: passing $_[3] on to $self->{'convert_to'}Plug\n" 
 	if $self->{'verbosity'} > 1;
+
     return ConvertToPlug::process_type($self,"rtf",@_);
 }
Index: /trunk/gsdl/perllib/plugins/WordPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/WordPlug.pm	(revision 2784)
+++ /trunk/gsdl/perllib/plugins/WordPlug.pm	(revision 2785)
@@ -45,5 +45,5 @@
 
     my $outhandle = $self->{'outhandle'};    
-    print $outhandle "WordPlug: passing $_[3] onto $self->{'convert_to'} Plug\n" 
+    print $outhandle "WordPlug: passing $_[3] on to $self->{'convert_to'}Plug\n" 
 	if $self->{'verbosity'} > 1;
     
@@ -51,5 +51,3 @@
 }
 
-
 1;
-
Index: /trunk/gsdl/perllib/plugins/ZIPPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/ZIPPlug.pm	(revision 2784)
+++ /trunk/gsdl/perllib/plugins/ZIPPlug.pm	(revision 2785)
@@ -119,4 +119,7 @@
 	my $numdocs = &plugin::read ($pluginfo, "", $tmpdir, $metadata, $processor, $maxdocs);
 	&util::rm_r ($tmpdir);
+
+	$self->{'num_archives'} ++;
+
 	return $numdocs;
 
Index: /trunk/gsdl/src/recpt/collectoraction.cpp
===================================================================
--- /trunk/gsdl/src/recpt/collectoraction.cpp	(revision 2784)
+++ /trunk/gsdl/src/recpt/collectoraction.cpp	(revision 2785)
@@ -1030,5 +1030,4 @@
   // _faillog_ - set to last 6 lines of .bld file if build failed
   // _gsdlhome_ - the gsdlhome path (dm_safe)
-
   // _sourcelist_ -- "input source" text boxes
   // _badsources_ -- will be set to "1" if we've come from the 
@@ -1154,4 +1153,7 @@
     collectorbar += get_button (collector_page, "grey", "view", false);
   }
+
+  collectorbar += "</tr></table>\n";
+  disp.setmacro ("collectorbar", "collector", collectorbar);
 
   if (collector_page == "bildfail") {
@@ -1175,7 +1177,4 @@
     disp.setmacro ("faillog", "collector", dm_safe(faillog));
   }
-
-  collectorbar += "</tr></table>\n";
-  disp.setmacro ("collectorbar", "collector", collectorbar);
 
   if (collector_page == "srce" || collector_page == "existing") 
@@ -1659,8 +1658,11 @@
   }
     
+  text_t collectdir = get_collectdir (args);
+
   // set up build options
   text_t options = "-make_writable -remove_import -out \"";
   options += filename_cat (tmpdir, collection + ".bld");
-  options += "\" -collectdir \"" + get_collectdir (args) + "\"";
+  options += "\" -collectdir \"" + collectdir + "\" -statsfile \"";
+  options += filename_cat(collectdir, collection, "etc", "import.log") + "\"";
 
   if (args["bc1esrce"] == 1) {
Index: /trunk/gsdl/src/recpt/pageaction.cpp
===================================================================
--- /trunk/gsdl/src/recpt/pageaction.cpp	(revision 2784)
+++ /trunk/gsdl/src/recpt/pageaction.cpp	(revision 2785)
@@ -28,4 +28,5 @@
 #include "receptionist.h"
 #include "fileutil.h"
+#include "gsdltools.h"
 #include <time.h>
 
@@ -327,4 +328,24 @@
 }
 
+void pageaction::set_macro_to_file_contents (displayclass &disp, const text_t &macroname,
+					     const text_t &packagename, const text_t &filename) {
+
+  text_t filecontent;
+  char *filenamec = filename.getcstr();
+  ifstream file_in (filenamec);
+  delete filenamec;
+  if (file_in) {
+    char c;
+    file_in.get(c);
+    while (!file_in.eof ()) {
+      if (c == '\n') filecontent += "<br>";
+      filecontent.push_back(c);
+      file_in.get(c);
+    }
+    file_in.close();
+  }
+  disp.setmacro (macroname, packagename, dm_safe(filecontent));
+}
+
 void pageaction::define_internal_macros (displayclass &disp, cgiargsclass &args, 
 					 recptprotolistclass *protos, ostream &logout) {
@@ -383,4 +404,9 @@
   // if page is "docs"
   // _documentation_       links to PDF documents if they're available
+
+
+  // if page is "bsummary"
+  // _importlog_           set to contents of collections import.log file
+  // _faillog_             set to contents of collections fail.log file
 
   
@@ -418,34 +444,15 @@
   //setting _queryformcontent_ so that the query interface is consistent.
   if(arg_p == "about"){
-    text_t collection = args["c"];
-     //check that the protocol is alive
-    recptproto* colproto = protos->getrecptproto (collection, logout);
-    if(colproto == NULL) {
-      logout << "ERROR: Null collection protocol trying to query"
-	     << collection.getcstr() << "\n";
-      return;
-    }
-    
-    //check the collection is responding/in place
-    ColInfoResponse_t *colinfo = recpt->get_collectinfo_ptr(colproto, collection,
-							    logout);
-    if(colinfo == NULL){
-      logout << "ERROR: Null returned for get_collectinfo_ptr on "
-	     << collection.getcstr() << "in queryaction::define_query_interface\n";
-      return;
-    }
-    
-    
-    text_tmap::iterator check = colinfo->format.find("QueryInterface");
-    if(check != colinfo->format.end()){
-      if((*check).second=="DateSearch"){
-	text_t current = "_basicqueryform_ _datesearch_";
+    if (cinfo != NULL) {
+      text_tmap::iterator check = cinfo->format.find("QueryInterface");
+      if(check != cinfo->format.end()){
+	if((*check).second=="DateSearch"){
+	  text_t current = "_basicqueryform_ _datesearch_";
 	
-	disp.setmacro("queryformcontent","query",current);
-      }
-    }
-  }
-
-
+	  disp.setmacro("queryformcontent","query",current);
+	}
+      }
+    }
+  }
 
   if (arg_p == "home") {
@@ -454,7 +461,4 @@
     if (collector_disabled) disp.setmacro ("textgocollector", "home", "");
   }
-
-
-  
   
   else if (arg_p == "preferences") {
@@ -462,5 +466,5 @@
     // _collectionoption_
 
-    if (args["ccs"] == "1" && collectproto != NULL && (cinfo->ccsCols.size() > 1)) {
+    if ((args["ccs"] == "1") && (cinfo->ccsCols.size() > 1)) {
       text_t collectionoption = "_textcollectionoption_";
       text_tarray::const_iterator col_here = cinfo->ccsCols.begin();
@@ -675,4 +679,10 @@
     set_documentation_macro (disp);
 
+  } else if (arg_p == "bsummary" && !arg_c.empty()) {
+
+    set_macro_to_file_contents (disp, "importlog", "bsummary",
+				filename_cat(gsdlhome, "collect", arg_c, "etc", "import.log"));
+    set_macro_to_file_contents (disp, "faillog", "bsummary",
+				filename_cat(gsdlhome, "collect", arg_c, "etc", "fail.log"));
   }
 }
Index: /trunk/gsdl/src/recpt/pageaction.h
===================================================================
--- /trunk/gsdl/src/recpt/pageaction.h	(revision 2784)
+++ /trunk/gsdl/src/recpt/pageaction.h	(revision 2785)
@@ -75,4 +75,7 @@
   void set_documentation_macro (displayclass &disp);
 
+  void set_macro_to_file_contents (displayclass &disp, const text_t &macroname,
+				   const text_t &packagename, const text_t &filename);
+
   bool status_disabled;
   bool collector_disabled;
