Display Postgres server logs output in terminal and record to logs at same time

后端 未结 2 864
广开言路
广开言路 2020-12-18 05:48

I\'m running Postgres 9.1 (Homebrew installation on Mac OSX) and I\'d like to monitor my postgres server more closely.

My question relates to logs. I\'d like to get

相关标签:
2条回答
  • 2020-12-18 06:35

    You could watch the log with the command:

    tail -f /usr/local/var/postgres/server.log
    
    0 讨论(0)
  • 2020-12-18 06:35

    I was able to find the logs in:

    less /var/log/postgresql/postgresql-10-main.log
    

    using ubuntu 18.04 with postgresql version: 10

    0 讨论(0)
提交回复
热议问题