Thread: Perl Interface is printing NOTICE's on stderr

Perl Interface is printing NOTICE's on stderr

From
"Bryan White"
Date:
I have a function that I have added to the database that prints a client
sighon message to the backends log file.  It uses elog(NOTICE...) to write
to the log file.  I routinely call this funct when making a database
connection and it in combination with pids in the log file it is much easier
to correlate client programs with error messages.

My problem is that when the client side is a perl program using the Pg
module, the NOTICE messages are also printed on the client side.  I think
they are going to stderr.

Can someone suggest how to prevent this?

Bryan White




Re: Perl Interface is printing NOTICE's on stderr

From
Tom Lane
Date:
"Bryan White" <bryan@arcamax.com> writes:
> I have a function that I have added to the database that prints a client
> sighon message to the backends log file.  It uses elog(NOTICE...) to write
> to the log file.
> My problem is that when the client side is a perl program using the Pg
> module, the NOTICE messages are also printed on the client side.  I think
> they are going to stderr.

> Can someone suggest how to prevent this?

Try elog(DEBUG, ...) instead.
        regards, tom lane