Created
June 10, 2011 18:35
Revisions
-
Eric Allam created this gist
Jun 10, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ Open the postgresql.conf config file: $> mate /usr/local/var/postgres/postgresql.conf Uncomment the line with 'log_destination' and set it to 'syslog' log_destination = 'syslog' Open the syslog config: $> mate /etc/syslog.conf And add this line: local0.* /var/log/postgresql Then just restart syslog and postgresql $> ps aux | grep syslog $> sudo kill -2 PID $> launchctl unload -w ~/Library/LaunchAgents/org.postgresql.postgres.plist $> launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist Now you can tail the log file and see the queries that rails runs: $> tail -f /var/log/postgresql