|||
参考PostgreSQL 8.4.3 Documentation :
18.7. Error Reporting and Logging(http://www.postgresql.org/docs/8.4/interactive/runtime-config-logging.html)来进行设置,我的设置如下,大家可以做一个参考:
# - Where to Log -
#log_destination = 'stderr'
logging_collector = on
log_directory = 'pg_log'
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
# - When to Log -
#client_min_messages = notice
log_min_messages = debug5
# - What to Log -
debug_print_parse = on
debug_print_rewritten = on
debug_print_plan = on
debug_pretty_print = on
#log_checkpoints = off
log_connections = on
log_disconnection = on
这样子当你的服务器运行的时候,你在/usr/local/pgsql/data/pg_log 目录下,就可以看到生成的日志了。
加我私人微信,交流技术。
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-9-27 07:06
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社