elog() proposals

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: elog() proposals
Date: 2002-02-19 05:36:49
Message-ID: 200202200513.g1K5Dbk06341@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I just submitted a patch to fix various elog() issues. I have two
additional proposals.

First, I think ERROR/DEBUG/NOTICE/FATAL, etc are too generic and cause
compile problems/warnings, especially with Perl. I suggest renaming all
elog levels to PG*, so it would be PGERROR and PGINFO. We could also do
E_* or E*. I am interested in other opinions.

Second, I propose adding two GUC variables that control how much elog()
info is sent to the server and client logs. I suggest
'server_message_min' with possible values DEBUG, LOG, NOTICE, ERROR,
FATAL, CRASH; and 'client_message_min' with possible values INFO,
NOTICE, ERROR, FATAL, CRASH.

We currently have 'debug_level' which controls how much debug
information is sent to the server logs. I believe this would have to
remain because it controls how _much_ DEBUG output is printed. We could
go with some kind of hybrid where "DEBUG 5" sets DEBUG as the minimum
reporting mode with level 5.

This functionality mimics the log filter functionality of syslog(3).

Comments?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2002-02-19 06:48:40 Re: Ready to branch 7.2/7.3 ?
Previous Message Neil Conway 2002-02-19 04:15:05 Re: pg_dump: use ALTER TABLE for PKs