Re: DEBUG messages - Mailing list pgsql-general

From Tom Lane
Subject Re: DEBUG messages
Date
Msg-id 17936.1007647140@sss.pgh.pa.us
Whole thread Raw
In response to Re: DEBUG messages  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: DEBUG messages
Re: DEBUG messages
List pgsql-general
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Added to TODO:
>     * Change DEBUG tag used in server logs
> Seems it should say NOTICE.

It had better *not* be a NOTICE, because there is no attached client
to forward the message to.

There is some confusion in the elog() design between message severity
level and message destination, viz DEBUG goes only to postmaster log,
NOTICE and up go to client and log.  And then we have a separate
DebugLevel variable that controls how many places will emit DEBUG
messages.  It might be better to unify this into a single mechanism.
Maybe replace
    if (DebugLevel > 2)
        elog(DEBUG, ...)
with
    elog(DEBUG2, ...)
and then have two GUC variables consulted by elog that tell the
minimum message level to send to the log and the client respectively.

            regards, tom lane

pgsql-general by date:

Previous
From: Gunnar Rønning
Date:
Subject: Re: java stored procedures
Next
From: "Gregory Wood"
Date:
Subject: Re: Sparc v Intel