Using elog instead of printf to report what database we are on

I know the ... is pretty but it messes up with warnings etc. By the way there
was a \n so the skipped part wasn't even going on the same line.
This commit is contained in:
Daniele Varrazzo 2013-04-17 17:47:44 +01:00
parent 4a3f42ab70
commit 5773c75b58

View File

@ -365,22 +365,10 @@ repack_all_databases(const char *orderby)
dbname = PQgetvalue(result, i, 0);
if (pgut_log_level >= INFO)
{
printf("%s: repack database \"%s\"\n", PROGRAM_NAME, dbname);
fflush(stdout);
}
elog(INFO, "repacking database \"%s\"", dbname);
ret = repack_one_database(orderby, errbuf, sizeof(errbuf));
if (pgut_log_level >= INFO)
{
if (ret)
printf("\n");
else
printf(" ... skipped: %s\n", errbuf);
fflush(stdout);
}
if (!ret)
elog(INFO, "database \"%s\" skipped: %s", dbname, errbuf);
}
CLEARPGRES(result);