[greenstone-users] fail log for xml metadata files?

From Katherine Don
DateMon Sep 6 11:54:09 2010
Subject [greenstone-users] fail log for xml metadata files?
In-Reply-To (53dad501b83f678e2e6fa85b2f46c640-squirrel-webmail-fahce-unlp-edu-ar)
Hi Mariana

You need to modify the perllib/plugins/MetadataXMLPlugin.pm file.

Look for the metadata_read method, and the bit near the end of that method:
Should look something like the following:
if ($@) {
my $plugin_name = ref ($self);
print $outhandle "$plugin_name failed to process $file ($@) ";
return -1; #error
}

Change it to the following:

if ($@) {
my $plugin_name = ref ($self);
my $failhandle = $self->{'failhandle'};
print $failhandle "$plugin_name failed to process $file ($@) ";
print $outhandle "$plugin_name failed to process $file ($@) ";
return -1; #error
}

(ie add the two failhandle lines.)

And it should log to fail.log as well.
I have committed this change to the repository so will be in the next
release.

Regards,
Katherine


Mariana Pichinini wrote:
> Hello everybody
>
> The fail.log file, generated by import.pl (Greenstone v2.82), include
> records from the data files that failed to be processed sucessfully.
> But it does not log rejected metadata files, usually malformed xml.
>
> There is any way to include them in the fail log file?
>
> Thanks in advance
>
> Lic. Mariana Pichinini
> Area Tecnolog□as
> _______________________________________________
> BIBHUMA - Biblioteca Profesor Guillermo Obiols
> Facultad de Humanidades y Ciencias de la Educaci□n
> Universidad Nacional de La Plata
> Calle 48 entre 6 y 7 - 1er subsuelo
> B1900AMW LA PLATA, Argentina
> Telefax: +54-221-4230125 interno 162 (l□neas rotativas)
> WEB: www.bibhuma.fahce.unlp.edu.ar
>
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>
>