postgreSQL 查看日志

win配置

打开Postgresql配置文件,如:C:\Program Files\PostgreSQL\14\data\postgresql.conf

log_directory = 'log'
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,
log_statement = 'all  # 关键点

处理win10 乱码

打开配置文件 ~datapostgresql.conf
修改 lc_messages = 'C'

修改日志格式

log_filename = 'postgresql-%Y-%m-%d_%H%M%S.sql'    # log file name pattern,

- 直接配置为 .sql结尾的文件, 很nice

原文链接: postgreSQL 查看日志 版权所有,转载时请注明出处,违者必究。
注明出处格式:流沙团 ( https://www.gyarmy.com/post-746.html )

发表评论

0则评论给“postgreSQL 查看日志”