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
thx! used your guide and logging works fine now. only restarting the syslog did not work so i restarted my whole computer instead :)