Kyotaro Horiguchi <horikyota....@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