Re: elog(LOG), elog(DEBUG)

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: elog(LOG), elog(DEBUG)
Date: 2001-05-05 20:57:56
Message-ID: Pine.LNX.4.30.0105052251060.769-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane writes:

> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > There's a TODO item to make elog(LOG) a separate level. I propose the
> > name INFO. It would be identical to DEBUG in effect, only with a
> > different label.
>
> This conveys nothing to my mind. How should I determine whether a given
> elog call ought to use INFO or DEBUG?

DEBUG is for messages intended to help locating and analyzing faults in
the source code (i.e., debugging). Normal users don't need this during
normal operation.

INFO (or whatever the name) is for messages that administrator's might be
interested in for auditing and tuning.

Example:

elog(DEBUG, "heapgettup(..., b=0x%x, nkeys=%d, key=0x%x", buffer, nkeys, key);

vs.

elog(INFO, "connection: host=%s user=%s database=%s", ...);

There are maybe a dozen potential INFO messages, plus a few to be
converted fprintf's.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-05-05 21:39:41 Re: Lisp as procedural language
Previous Message The Hermit Hacker 2001-05-05 20:36:02 v7.1.1 Branched, Packaged and Released ...