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:
parent
4a3f42ab70
commit
5773c75b58
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user