Skip to content

Commit 5773c75

Browse files
committed
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.
1 parent 4a3f42a commit 5773c75

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

bin/pg_repack.c

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -365,22 +365,10 @@ repack_all_databases(const char *orderby)
365365

366366
dbname = PQgetvalue(result, i, 0);
367367

368-
if (pgut_log_level >= INFO)
369-
{
370-
printf("%s: repack database \"%s\"\n", PROGRAM_NAME, dbname);
371-
fflush(stdout);
372-
}
373-
368+
elog(INFO, "repacking database \"%s\"", dbname);
374369
ret = repack_one_database(orderby, errbuf, sizeof(errbuf));
375-
376-
if (pgut_log_level >= INFO)
377-
{
378-
if (ret)
379-
printf("\n");
380-
else
381-
printf(" ... skipped: %s\n", errbuf);
382-
fflush(stdout);
383-
}
370+
if (!ret)
371+
elog(INFO, "database \"%s\" skipped: %s", dbname, errbuf);
384372
}
385373

386374
CLEARPGRES(result);

0 commit comments

Comments
 (0)