mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
logging: Also add the command prefix to detail and hint messages
This makes the output line up better and allows filtering messages by command. Discussion: https://www.postgresql.org/message-id/ba6d4fac-9e33-91f9-94fb-1e4c144a48b9@enterprisedb.com
This commit is contained in:
parent
b3fb16e8bb
commit
a8cca6026e
@ -30,7 +30,7 @@ my ($cmd, $stdout, $stderr, $result);
|
|||||||
|
|
||||||
command_fails_like(
|
command_fails_like(
|
||||||
[ "pg_dump", '-p', $port, '--include-foreign-data=s0', 'postgres' ],
|
[ "pg_dump", '-p', $port, '--include-foreign-data=s0', 'postgres' ],
|
||||||
qr/foreign-data wrapper \"dummy\" has no handler\r?\ndetail: Query was: .*t0/,
|
qr/foreign-data wrapper \"dummy\" has no handler\r?\npg_dump: detail: Query was: .*t0/,
|
||||||
"correctly fails to dump a foreign table from a dummy FDW");
|
"correctly fails to dump a foreign table from a dummy FDW");
|
||||||
|
|
||||||
command_ok(
|
command_ok(
|
||||||
|
@ -246,8 +246,7 @@ pg_log_generic_v(enum pg_log_level level, enum pg_log_part part,
|
|||||||
|
|
||||||
fmt = _(fmt);
|
fmt = _(fmt);
|
||||||
|
|
||||||
if (part == PG_LOG_PRIMARY &&
|
if (!(log_flags & PG_LOG_FLAG_TERSE) || filename)
|
||||||
(!(log_flags & PG_LOG_FLAG_TERSE) || filename))
|
|
||||||
{
|
{
|
||||||
if (sgr_locus)
|
if (sgr_locus)
|
||||||
fprintf(stderr, ANSI_ESCAPE_FMT, sgr_locus);
|
fprintf(stderr, ANSI_ESCAPE_FMT, sgr_locus);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user