even better output
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 15 May 2006 17:49:01 +0000 (17:49 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 15 May 2006 17:49:01 +0000 (17:49 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@511 07558da8-63fa-0310-ba24-9fe276d99e06

run.pl

diff --git a/run.pl b/run.pl
index ac0679a..970f969 100755 (executable)
--- a/run.pl
+++ b/run.pl
@@ -152,10 +152,10 @@ while (my ($database, $db_config) = each %{ $config->{databases} }) {
        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(
@@ -194,7 +194,7 @@ while (my ($database, $db_config) = each %{ $config->{databases} }) {
 
                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 @@ while (my ($database, $db_config) = each %{ $config->{databases} }) {
        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)
                )
        );