Re: print in plpython not appearing in logs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: print in plpython not appearing in logs
Дата
Msg-id 2242530.1670077780@sss.pgh.pa.us
обсуждение исходный текст
Ответ на print in plpython not appearing in logs  (Ludwig Isaac Lim <ludz_lim@yahoo.com>)
Ответы Re: print in plpython not appearing in logs  (Ludwig Isaac Lim <ludz_lim@yahoo.com>)
Список pgsql-general
Ludwig Isaac Lim <ludz_lim@yahoo.com> writes:
> I'm having problems wherein my print() statements inside my plpython stored proc are not appearing in postgresql log.
Itried setting the file=sys.stderr 

Hmm.  I can tell you that with "logging_collector = on", I would only
expect the logs to capture stderr output, not stdout.  So it makes
sense to me that plain "print" would disappear into the bit bucket.
But if you specify stderr output, it ought to work.  I don't know
enough Python to know why it's not working, but it seems to me this is
primarily a Python question not a Postgres question.  Maybe you need
an explicit fflush-equivalent step?  Dunno.

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Stored procedure code no longer stored in v14 and v15, changed behaviour
Следующее
От: Brad White
Дата:
Сообщение: Re: Stored procedure code no longer stored in v14 and v15, changed behaviour