Re: Frontend error logging style

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Frontend error logging style
Дата
Msg-id 1492693.1636597228@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Frontend error logging style  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
Kyotaro Horiguchi <horikyota.ntt@gmail.com> writes:
> 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...

I abandoned that idea in the draft patch.  We could maybe do something
about it further down the line, but I'm not sure there's really any
demand.

As the patch is set up, you could theoretically do something like

    pg_log_error("blah blah");
    pg_log_info_detail("Very boring detail goes here.");

(note the intentionally different log priorities).  But that feels wrong
to me --- it doesn't seem like individual call sites should be setting
such policy.  If we do arrange for a way to hide the optional message
parts, I'd rather that the control were centralized in logging.c.

It certainly wouldn't be hard for logging.c to make different decisions
about what to print; the thing that's not clear to me is what the
user-level knob for it should look like.  We already used up the
option of more or fewer -v switches.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: standby recovery fails (tablespace related) (tentative patch and discussion)
Следующее
От: "kuroda.hayato@fujitsu.com"
Дата:
Сообщение: RE: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit