--- trunk/run.pl 2006/05/15 17:38:22 510 +++ trunk/run.pl 2006/05/15 18:27:15 512 @@ -111,7 +111,7 @@ while (my ($database, $db_config) = each %{ $config->{databases} }) { - my ($only_database,$only_input) = split(m#/#, $only_filter); + my ($only_database,$only_input) = split(m#/#, $only_filter) if ($only_filter); next if ($only_database && $database !~ m/$only_database/i); my $indexer; @@ -152,10 +152,10 @@ my $db_path = $config->{webpac}->{db_path} . '/' . $database; if ($clean) { - $log->info("creating new database $database in $db_path"); + $log->info("creating new database '$database' in $db_path"); rmtree( $db_path ) || $log->warn("can't remove $db_path: $!"); } else { - $log->debug("working on $database in $db_path"); + $log->info("working on database '$database' in $db_path"); } my $db = new WebPAC::Store( @@ -182,7 +182,7 @@ foreach my $input (@inputs) { - next if ($only_input && $input->{name} =~ m#$only_input#i || $input->{type} =~ m#$only_input#i); + next if ($only_input && ($input->{name} !~ m#$only_input#i && $input->{type} !~ m#$only_input#i)); my $type = lc($input->{type}); @@ -194,7 +194,7 @@ my $input_module = $config->{webpac}->{inputs}->{$type}; - $log->info("working on input '$input->{path}' [$input->{type}] using $input_module lookup '$input->{lookup}'"); + $log->info("working on input '$input->{name}' in $input->{path} [type: $input->{type}] using $input_module lookup '$input->{lookup}'"); my $input_db = new WebPAC::Input( module => $input_module, @@ -296,8 +296,8 @@ eval { $indexer->finish } if ($indexer && $indexer->can('finish')); my $dt = time() - $start_t; - $log->info("$total_rows records indexed in " . - sprintf("%.2f sec [%.2f rec/sec]", + $log->info("$total_rows records ", $indexer ? "indexed " : "", + sprintf("in %.2f sec [%.2f rec/sec]", $dt, ($total_rows / $dt) ) );