Changeset 29379 for main/trunk/greenstone2/perllib/inexport.pm
- Timestamp:
- 2014-10-20T10:08:50+13:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/inexport.pm
r29370 r29379 254 254 $out->autoflush(1); 255 255 $self->{'out'} = $out; 256 257 my $statsfile = $self->{'statsfile'}; 258 if ($statsfile !~ /^(STDERR|STDOUT)$/i) { 259 open (STATSFILE, ">$statsfile") || 260 (&gsprintf(STDERR, "{common.cannot_open_output_file}: $!\n", $statsfile) && die); 261 $statsfile = 'inexport::STATSFILE'; 262 $self->{'close_stats'} = 1; 263 } 264 $statsfile->autoflush(1); 265 $self->{'statsfile'} = $statsfile; 256 266 257 267 # @ARGV should be only one item, the name of the collection … … 1037 1047 my $out = $self->{'out'}; 1038 1048 my $faillogname = $self->{'faillogname'}; 1049 my $statsfile = $self->{'statsfile'}; 1039 1050 my $gli = $self->{'gli'}; 1040 1051 … … 1044 1055 &gsprintf($out, "*********************************************\n"); 1045 1056 1046 &plugin::write_stats($pluginfo, 'STDERR', $faillogname, $gli);1057 &plugin::write_stats($pluginfo, $statsfile, $faillogname, $gli); 1047 1058 } 1048 1059 # generate_statistics() … … 1057 1068 close OUT if $self->{'close_out'}; 1058 1069 close FAILLOG if $self->{'close_faillog'}; 1070 close STATSFILE if $self->{'close_statsfile'}; 1059 1071 } 1060 1072 # deinit()
Note:
See TracChangeset
for help on using the changeset viewer.