Thread: Perl Interface is printing NOTICE's on stderr
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
"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