0

I have a Django project running in virtual environment(in MAC OS), where can I access the postgres logs? Before asking this question,I have looked into following posts but I could not find logs in the places they suggest * http://www.postgresql.org/docs/9.0/static/runtime-config-logging.html * How to check status of PostgreSQL server Mac OS X * http://www.postgresqlformac.com/server/error_startup_fails_after_i.html * Where are the PostgreSQL logs on Mac OS X?

Community
  • 1
  • 1
name
  • 571
  • 1
  • 7
  • 11

1 Answers1

2
  1. You may find it using the following command:

    sudo find / -name pg_log
    

    Output:

    /Library/PostgreSQL/9.2/data/pg_log
    
  2. If the above attempt fails, try to find log location in your plist

    My plist is located at /Library/LaunchDaemons/, another possible location is /Library/LaunchAgents/.

    Check if com.edb.launchd.postgresql-9.2.plist contains the following section:

    <dict>
      ......
      <key>StandardErrorPath</key>
      <string>/usr/local/var/postgres/server.log</string>
    </dict>
    

    In the above case, the log is located at /usr/local/var/postgres/server.log

Mingyu
  • 31,751
  • 14
  • 55
  • 60
  • Nothing is showing up with that command. Is pg_log the log file for psql? Where can I set the log file path details for psql? – name Aug 04 '13 at 16:59
  • It worked, I have my logs in /usr/local/var/postgres/server.log – name Aug 04 '13 at 19:07