JBAS-1437 bib linking log more info
authorBill Erickson <berickxx@gmail.com>
Fri, 2 Dec 2016 19:02:23 +0000 (14:02 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/linking/authority_control_fields.pl

index 91d9d7e..a560384 100755 (executable)
@@ -74,8 +74,9 @@ my $result = GetOptions(
 
 sub announce {
     my $msg = shift;
-    return unless $verbose;
-    print DateTime->now->strftime('%F %T') . " $msg\n";
+    my $force = shift;
+    return unless $force || $verbose;
+    print DateTime->now->strftime('%F %T') . " [$$] $msg\n";
 }
 
 if (!$result or $options{help}) {
@@ -710,8 +711,13 @@ sub update_record {
 
 my $count = 0;
 my $total = scalar(@records);
+announce("processing $total bib records", 1);
+
 foreach my $rec_id (@records) {
     $count++;
+
+    announce("processing $count of $total", 1) if ($count % 1000) == 0;
+
     announce("processing bib record $rec_id [$count of $total]");
 
     # State variable; was the record changed?