Skip to content
Snippets Groups Projects
Commit 510927ee authored by Gerhard Gonter's avatar Gerhard Gonter :speech_balloon:
Browse files

redirecting logs

parent 3b7dd888
No related branches found
No related tags found
No related merge requests found
...@@ -469,6 +469,7 @@ my $fo_count= $fo_rec->open(); ...@@ -469,6 +469,7 @@ my $fo_count= $fo_rec->open();
'id' => $id, 'id' => $id,
'tlt_l' => \%tlt_l, 'tlt_l' => \%tlt_l,
'tlt_d' => \%tlt_d, 'tlt_d' => \%tlt_d,
# P31 => $P31,
}; };
} }
} }
...@@ -562,7 +563,7 @@ my $fo_count= $fo_rec->open(); ...@@ -562,7 +563,7 @@ my $fo_count= $fo_rec->open();
print FO_AUTHCTRL ",\n" if ($cnt_authctrl); print FO_AUTHCTRL ",\n" if ($cnt_authctrl);
print FO_AUTHCTRL encode_json($authctrl); print FO_AUTHCTRL encode_json($authctrl);
$cnt_authctrl++; $cnt_authctrl++;
printf ("%8ld authority control records\n", $cnt_authctrl) if (($cnt_authctrl % 1000) == 0); printf ("%9ld authority control records\n", $cnt_authctrl) if (($cnt_authctrl % 1000) == 0);
} }
last if (defined ($MAX_INPUT_LINES) && $line >= $MAX_INPUT_LINES); ### DEBUG last if (defined ($MAX_INPUT_LINES) && $line >= $MAX_INPUT_LINES); ### DEBUG
...@@ -604,24 +605,31 @@ foreach my $prop_num (@prop_ids) ...@@ -604,24 +605,31 @@ foreach my $prop_num (@prop_ids)
} }
close (PROPS_LIST); close (PROPS_LIST);
open (PROPS, '>:utf8', $data_dir . '/props.json') or die; if (open (PROPS, '>:utf8', $data_dir . '/props.json'))
{
print PROPS encode_json (\%props); print PROPS encode_json (\%props);
close (PROPS); close (PROPS);
}
my $stats_opened= 0;
if (open (STATS, '>:utf8', $data_dir . '/conversion-stats.log'))
{
$stats_opened= 1;
print STATS "pos: $pos\n";
print STATS "types: ", Dumper (\%types);
print STATS "attrs: ", Dumper (\%attrs);
print STATS "lang_labels: ", Dumper (\%lang_labels);
print STATS "lang_descr: ", Dumper (\%lang_descr);
print STATS "lang_aliases: ", Dumper (\%lang_aliases);
print STATS "name_sitelinks: ", Dumper (\%name_sitelinks);
print STATS "prop_claims: ", Dumper (\%prop_claims);
print "pos: $pos\n"; print STATS "max_id: $max_id\n";
print "types: ", Dumper (\%types); print STATS "max_prop: $max_prop\n";
print "attrs: ", Dumper (\%attrs); print STATS "lines: $line\n";
print "lang_labels: ", Dumper (\%lang_labels); print STATS "fo_count: $fo_count\n";
print "lang_descr: ", Dumper (\%lang_descr); print STATS "cnt_authctrl: $cnt_authctrl\n";
print "lang_aliases: ", Dumper (\%lang_aliases); }
print "name_sitelinks: ", Dumper (\%name_sitelinks);
print "prop_claims: ", Dumper (\%prop_claims);
print "max_id: $max_id\n";
print "max_prop: $max_prop\n";
print "lines: $line\n";
print "fo_count: $fo_count\n";
print "cnt_authctrl: $cnt_authctrl\n";
if ($exp_bitmap == 1) if ($exp_bitmap == 1)
{ {
...@@ -651,6 +659,14 @@ print "cnt_authctrl: $cnt_authctrl\n"; ...@@ -651,6 +659,14 @@ print "cnt_authctrl: $cnt_authctrl\n";
print "started: ", scalar localtime ($t_start), "\n"; print "started: ", scalar localtime ($t_start), "\n";
print "finished: ", scalar localtime ($t_end), "\n"; print "finished: ", scalar localtime ($t_end), "\n";
print "duration: ", $t_end-$t_start, " seconds\n"; print "duration: ", $t_end-$t_start, " seconds\n";
if ($stats_opened)
{
print STATS "started: ", scalar localtime ($t_start), "\n";
print STATS "finished: ", scalar localtime ($t_end), "\n";
print STATS "duration: ", $t_end-$t_start, " seconds\n";
close (STATS);
}
} }
sub counter sub counter
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment