using syslog to capture RAISE notices

From: "Dan Langille" <dan(at)langille(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: using syslog to capture RAISE notices
Date: 2002-03-11 18:49:51
Message-ID: 20020311184952.832B13F0E@bast.unixathome.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Can syslog be configured to capture RAISE messages?

Reading http://www.postgresql.org/idocs/index.php?plpgsql-
description.html#PLPGSQL-DESCRIPTION-ABORTING-AND-MESSAGES, I know how to
raise an exception, notice, or debug message. But I've been unable to get
those messages logged via syslog.

I have this in syslog.conf:

*.debug;*.notice;kern.debug;lpr.info;mail.crit;news.err /var/log/messages

Here is the test routine I've used:

DROP FUNCTION test();
CREATE FUNCTION test() returns int8 AS '
BEGIN
raise DEBUG \'this is dan raising a notice\';
RETURN 1;
END
' LANGUAGE 'plpgsql';

And the test:

fp2rifixed=# select test();
test
------
1
(1 row)

But nothing appears in /var/log/messages (yes, syslogd was HUP'd).

FWIW, this is PostgreSQL 7.2 under FreeBSD 4.5.
--
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Frank_Lupo Frank_Lupo 2002-03-11 18:52:08 If possible create a table (not temp) for every user using equal name?
Previous Message Chad R. Larson 2002-03-11 18:16:57 Re: Postgres not starting at boot(FreeBSD) - startup