Skip to content

Commit a8cca60

Browse files
committed
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
1 parent b3fb16e commit a8cca60

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/bin/pg_dump/t/003_pg_dump_with_server.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
command_fails_like(
3232
[ "pg_dump", '-p', $port, '--include-foreign-data=s0', 'postgres' ],
33-
qr/foreign-data wrapper \"dummy\" has no handler\r?\ndetail: Query was: .*t0/,
33+
qr/foreign-data wrapper \"dummy\" has no handler\r?\npg_dump: detail: Query was: .*t0/,
3434
"correctly fails to dump a foreign table from a dummy FDW");
3535

3636
command_ok(

src/common/logging.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,7 @@ pg_log_generic_v(enum pg_log_level level, enum pg_log_part part,
246246

247247
fmt = _(fmt);
248248

249-
if (part == PG_LOG_PRIMARY &&
250-
(!(log_flags & PG_LOG_FLAG_TERSE) || filename))
249+
if (!(log_flags & PG_LOG_FLAG_TERSE) || filename)
251250
{
252251
if (sgr_locus)
253252
fprintf(stderr, ANSI_ESCAPE_FMT, sgr_locus);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy