From: | "Ian Bell" <ib(at)ianbellsoftware(dot)com> |
---|---|
To: | "'Olivier Gautherot'" <olivier(at)gautherot(dot)net> |
Cc: | <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | RE: unable to write 'raise' messages to log file? |
Date: | 2018-05-31 19:40:32 |
Message-ID: | !&!AAAAAAAAAAAYAAAAAAAAADldbAmb6+pIq6nH7MxZl07CgAAAEAAAAOQJsml+vs1FlbTztktpWwwBAAAAAA==@ianbellsoftware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello Olivier,
Yes, I have used ‘notice’, ‘log’ and the various ‘debug’ levels but again none of my message show up in the log files.
Ian
From: Olivier Gautherot [mailto:olivier(at)gautherot(dot)net]
Sent: 31 May, 2018 15:26
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: ib(at)ianbellsoftware(dot)com; pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: unable to write 'raise' messages to log file?
Hi Ian,
On Thu, May 31, 2018 at 3:19 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com> > wrote:
On 05/31/2018 12:15 PM, Olivier Gautherot wrote:
On Thu, May 31, 2018 at 3:07 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com> <mailto:adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com> >> wrote:
On 05/31/2018 11:20 AM, Ian Bell wrote:
I am having considerable difficulty logging information in
PL-pgSQL functions by using the ‘RAISE’ statement. I am
asking for comments/suggestions on what I am doing wrong.
I’ve tried flushing/rotating the log files by executing *‘select
pg_rotate_logfile()’* in PSQL but my messages never appear in
the log files. I’ve tried calling my PL-pgSQL functions in
PSQL, PgAdmin4, OmniDB and ADO.NET <http://ADO.NET> <http://ADO.NET> but again my
messages never appear in the log file.
On very rare occasions, I see my messages the log file if I
restart the PostgreSql server however restarting the server
generally does not flush my messages to the log files.
Do they show up in a client? For example psql:
[snip]
test_(aklaver)> select testwithbasictypearguments(1, 2.5, 'test');
LOG: Test.TestWithArguments: i = 1, n = 2.5, t = test
testwithbasictypearguments
----------------------------
0
(1 row)
-- Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com> <mailto:adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com> >
I've used the logs successfully here. What are the values of log_min_messages and log_min_error_statement in your postgresql.conf?
The settings are shown in the original post.
By any chance... did you try "RAISE NOTICE..." in your function? That's the level I usually use.
Olivier Gautherot
From | Date | Subject | |
---|---|---|---|
Next Message | Ian Bell | 2018-05-31 20:03:36 | now getting log messages! |
Previous Message | Adrian Klaver | 2018-05-31 19:27:24 | Re: unable to write 'raise' messages to log file? |