Re: Override compile time log levels of specific messages/modules

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Craig Ringer <craig(dot)ringer(at)2ndquadrant(dot)com>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Override compile time log levels of specific messages/modules
Date: 2016-09-11 03:31:07
Message-ID: 1b03dee2-5086-b2e3-8229-9211d39f842f@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/6/16 5:18 AM, Craig Ringer wrote:
> I think something automatic that we clearly define as unstable and not
> to be relied upon would be preferable. Plus we already have much of the
> infrastructure in elog.c as used by errcontext etc.

Actually, I wish this was a straight-up logging level feature, because I
need it all the time when debugging complicated user-level code.
Specifically, I wish there was a GUC that would alter
(client|log)_min_messages upon entering a specific function, either for
just that function or for anything that function subsequently called.
Bonus points if you could also specify a regex that the message text had
to match.

I realize that code-wise that's completely incompatible with what you're
discussing here, but I think the same API could be used (maybe as a
different GUC).
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532) mobile: 512-569-9461

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vitaly Burovoy 2016-09-11 03:38:43 Re: sequence data type
Previous Message Jim Nasby 2016-09-11 03:14:27 Re: sequence data type