From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | tgl(at)sss(dot)pgh(dot)pa(dot)us |
Cc: | robertmhaas(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org, peter(dot)eisentraut(at)enterprisedb(dot)com |
Subject: | Re: Frontend error logging style |
Date: | 2021-11-11 02:07:55 |
Message-ID: | 20211111.110755.186485829988584825.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Wed, 10 Nov 2021 14:25:08 -0500, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote in
> I wrote:
> > Hmm, interesting. Taking up my point #2, I'd been thinking about
> > proposing that we convert
> > pg_log_error("query failed: %s", PQerrorMessage(conn));
> > pg_log_error("query was: %s", todo);
> > to
> > pg_log_error("query failed: %s", PQerrorMessage(conn));
> > pg_log_error_detail("Query was: %s", todo);
>
> After looking around a bit, I see that a lot of these add-on messages
> are more nearly hints than details, so we'd probably better support
> both those cases right off the bat.
Sounds reasonable.
> To move things along a bit, here's a draft patch to logging.h/.c only
> to implement what I'm envisioning. I don't think there's much point
> in doing the per-call-site gruntwork until we have agreement on what
> the API is, so this seems like enough for discussion.
>
> (As a fervent hater of colorization, I don't have an opinion about
> whether or how to colorize the "detail:" and "hint:" fragments.
> But I'll happily take somebody else's adjustment to add that.)
(:) I don't hate colorization so much, but I'm frequently annoyed by
needing to turn off colorization and I disgust when there's no easy
way to disable that in a simple steps..)
Aren't DETAIL and HINT expected to be hidden at the targetted cutoff
level? In other words, I suspect that people want to hide non-primary
messages for a lower verbosity level. On the other hand I'm not sure
it is a proper behavior that log_level = WARNING causes ERROR messages
are accompanied by DETAIL/HINT submessages...
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2021-11-11 02:13:52 | Re: standby recovery fails (tablespace related) (tentative patch and discussion) |
Previous Message | Andres Freund | 2021-11-11 02:07:24 | Re: remove spurious CREATE INDEX CONCURRENTLY wait |