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?
Asked
Active
Viewed 199 times
0
-
1You should search first before submit a question http://stackoverflow.com/questions/2563494/where-postgresql-logs-are-on-mac-os-x – anhtran Aug 04 '13 at 14:18
-
I looked in those posts but I cannot find it there! – name Aug 04 '13 at 14:34
-
I think you might try install it via Homebrew http://brew.sh/. It's easy. – anhtran Aug 04 '13 at 14:46
-
I have installed it long back and have lots of data in it, dont want to reinstall now. – name Aug 04 '13 at 15:00
-
Backup the data is not hard. Sometimes we should choose the easy way! – anhtran Aug 04 '13 at 15:06
1 Answers
2
You may
find
it using the following command:sudo find / -name pg_log
Output:
/Library/PostgreSQL/9.2/data/pg_log
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
-