aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-05-30 07:18:57 +0200
committerPeter Eisentraut <peter@eisentraut.org>2022-05-30 07:26:06 +0200
commita8cca6026e992d9b627c7dbee5f8a50bde507a94 (patch)
tree43c4eb25c7be8fc5fce854c87b7109f811d95635 /src
parentb3fb16e8bb3eaadc6bd4e7cc6af816b0359d7b3d (diff)
downloadpostgresql-a8cca6026e992d9b627c7dbee5f8a50bde507a94.tar.gz
postgresql-a8cca6026e992d9b627c7dbee5f8a50bde507a94.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/t/003_pg_dump_with_server.pl2
-rw-r--r--src/common/logging.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/pg_dump/t/003_pg_dump_with_server.pl b/src/bin/pg_dump/t/003_pg_dump_with_server.pl
index a0b23aae0fb..8cc9da06599 100644
--- a/src/bin/pg_dump/t/003_pg_dump_with_server.pl
+++ b/src/bin/pg_dump/t/003_pg_dump_with_server.pl
@@ -30,7 +30,7 @@ my ($cmd, $stdout, $stderr, $result);
command_fails_like(
[ "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");
command_ok(
diff --git a/src/common/logging.c b/src/common/logging.c
index 0b5bcb1a172..64604c52096 100644
--- a/src/common/logging.c
+++ b/src/common/logging.c
@@ -246,8 +246,7 @@ pg_log_generic_v(enum pg_log_level level, enum pg_log_part part,
fmt = _(fmt);
- if (part == PG_LOG_PRIMARY &&
- (!(log_flags & PG_LOG_FLAG_TERSE) || filename))
+ if (!(log_flags & PG_LOG_FLAG_TERSE) || filename)
{
if (sgr_locus)
fprintf(stderr, ANSI_ESCAPE_FMT, sgr_locus);