参数说明
控制每条日志信息的详细程度。
默认: log_error_verbosity = default , terse、default、verbose三选一
terse模式下,返回的消息只包括严重性、主要文本以及位置;这些东西通常放在一个单一行中。
default模式生成的消息包括上面的信息加上任何细节、提示或者上下文域(这些可能跨越多行)。
verbose模式包括所有可以可用的域。修改细节模式不会影响来自已有PGresult对象中的可用消息。 只有随后创建的PGresult对象才受到影响。
参数测试
log_error_verbosity = default
参数设置
alter database postgres SET log_error_verbosity = 'default';
查看参数
postgres=# show log_error_verbosity;
log_error_verbosity
default
(1 row)
执行sql,查看pg日志如下:
2024-02-18 14:30:29 HKT [3490]: [3] user=postgres,db=postgres,app=PostgreSQL JDBC Driver,client=172.23.51.3 INFO: cuout:{"DSG_OP":"J","DSG_TABLE":"BUSINESS_HALL_QUEUE","DSG_OP_SCN":"1708237829219","DSG_SEQ_ID":"1","CP_SYSTEM":"cms","DSG_INSTANCE":"CMS","DSG_OWNER":"CP","DSG_OBJNNO":"","DSG_TRANS_ID":"0","DSG_OP_TIME":"2024-02-18 14:30:29","DSG_LOADERTIME":"2024-02-18 14:30:29","DSG_ORA_ROWID":"","S_DSG_SYSTEM":"cmsi","S_CP_CUNAME":"BusinessHallQueue","S_CP_CUKEY":["C307-3","1031"],"S_CP_CUID":-649165967,"S_DSG_INSTANCE":"BEIJING","S_DSG_OWNER":"BEIJING","S_DSG_TABLE":"BUSINESS_HALL_QUEUE","S_DSG_OP_SCN":"0","S_DSG_SEQ_ID":"0","S_DSG_OP_TIME":"2023-07-25 10:58:12","S_DSG_LOADERTIME":"","S_DSG_OP":"i","O_DSG_OP_TIME":"2023-07-25 10:58:12","O_DSG_LOADERTIME":"","CU_IN_TIME":"2024-02-18 14:30:29.205","CU_OUT_TIME":"2024-02-18 14:30:29.219","DSG_COLUMN":{"TICKET_NUMBER":"1031","PRODUCT_NO":"15010597437","USER_TYPE":"5","USER_STATE":"2","CHANNEL_ID":"C307-3","HANDLING_CODE":"02","HANDLING_NUMBER":"HW5101","WAITING_TIME":"2767","HANDLING_TIME":"","TAKE_TIME":"2023-07-23 10:33:05","CALL_TIME":"2023-07-23 11:19:12","END_TIME":"","DEAL_TIME":"2023-07-23 11:19:12","OTHER_INFO":"","FACT_TAB_NUM":3,"DEPT_COUNTY_ID":"","DEPT_COUNTY_NAME":"","REGIONAL_CENTER_ID":"","REGIONAL_CENTER_NAME":"","CHL_SHORT_NAME":"","DAY":"2023-07-23 00:00:00"},"PK":{"CHANNEL_ID":"C307-3","TICKET_NUMBER":"1031","DAY":"2023-07-23 00:00:00"},"CFG_VERSION":"20231029023549"}
2024-02-18 14:30:29 HKT [3490]: [4] user=postgres,db=postgres,app=PostgreSQL JDBC Driver,client=172.23.51.3 CONTEXT: SQL statement "SELECT cu.cu_send_record(recordStr, recordD2UStr, _pk, jsonBody::text)"
PL/pgSQL function cu.send_record(record,text,text,text,boolean,text) line 19 at PERFORM
SQL statement "SELECT cu.send_record(upi, 'BUSINESS_HALL_QUEUE', 'channel_id,ticket_number,day', _operation)"
PL/pgSQL function cu.cmsi_10001(jsonb,jsonb,text,text,text,text,text) line 44 at PERFORM
SQL statement "select cu.cmsi_10001($1,$2,$3,$4,$5,$6,$7);"
SQL statement "EXECUTE p_2f274ec0caf2387339a120fdc0f04834($ZYX$cmsi$ZYX$,$ZYX$BusinessHallQueue$ZYX$,$ZYX$["C307-3","1031"]$ZYX$,$ZYX$-649165967$ZYX$,$ZYX${"DSG_ORA_ROWID":"0","DSG_TRANS_ID":"0","DSG_TABLE":"BUSINESS_HALL_QUEUE","CP_SYSTEM":"cmsi","DSG_SEQ_ID":"0","DSG_INSTANCE":"BEIJING","DSG_OWNER":"BEIJING","DSG_OP_TIME":"2023-07-25 10:58:12","CP_CUNAME":"BusinessHallQueue","DSG_OP":"i","DSG_OBJNNO":"1001","DSG_LOADERTIME":"","DSG_COLUMN":{"HANDLING_NUMBER":"HW5101","CHANNEL_ID":"C307-3","WAITING_TIME":"2767","DEAL_TIME":"2023-07-23 11:19:12","TICKET_NUMBER":"1031","USER_STATE":"2","CALL_TIME":"2023-07-23 11:19:12","TAKE_TIME":"2023-07-23 10:33:05","HANDLING_CODE":"02","END_TIME":"","PRODUCT_NO":"15010597437","USER_TYPE":"5","OTHER_INFO":"","HANDLING_TIME":""},"PK":{"CHANNEL_ID":"C307-3","TICKET_NUMBER":"10