我在谷歌上搜索了很多,但没有找到解决方案,我不确定我在这里缺少什么。
我的目的是将此过程中的通知、信息存储到存储在日志目录中的 postgres 日志(txt 文件)中。
在postgres中,我写了一个简单的过程,如下所示。 - - 程序 - - -
create or replace procedure log_debug_info()
language 'plpgsql'
as $body$
begin
raise notice 'Test notice';
raise info 'Test info';
raise log 'test log';
raise debug 'test debug';
end;
$body$
Run Code Online (Sandbox Code Playgroud)
---结束------ 这是我对日志的配置。
#------------------------------------------------------------------------------
# REPORTING AND LOGGING
#------------------------------------------------------------------------------
# - Where to Log -
log_destination = 'stderr' # Valid values are combinations of
# stderr, csvlog, syslog, and eventlog,
# depending on platform. csvlog
# requires logging_collector to be on. …
Run Code Online (Sandbox Code Playgroud)