Re: DEBUG messages - Mailing list pgsql-general

From Bruce Momjian
Subject Re: DEBUG messages
Date
Msg-id 200112291714.fBTHEpM11455@candle.pha.pa.us
Whole thread Raw
In response to Re: DEBUG messages  (Tom Lane <tgl@sss.pgh.pa.us>)
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.

Tom, my idea on this was to emit NOTICE to clients only if a client
exists, and in postmaster startup, it does not.  Frankly, assuming a
client exists for all NOTICE elogs is a bug anyway.

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

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: I wrote a program to migrate Interbase -> PostgreSQL
Next
From: Bruce Momjian
Date:
Subject: Re: An error in docs? (client-only installation)