views:

131

answers:

3

I would like to take a look to postgresql log files to see what my app tells him but I can't find them.

Any ideas?

A: 

Look in /var/log/pg_log/ folder

systempuntoout
Not there, probably it's because used the EnterpriseDB MacOS package.
Xan
A: 

Just ask your database:

SELECT 
    * 
FROM 
    pg_settings 
WHERE 
    category IN( 'Reporting and Logging / Where to Log' , 'File Locations')
ORDER BY 
    category,
    name;

In my case, it's in "/Library/PostgreSQL/8.4/data/pg_log"

Frank Heikens
hmm, in my case it's stderr :/sql result as csv here: http://pastebin.com/20C92z2v
Xan
u I like the "cross platform" solution
Xan
A: 

On OS X, if you're using the EnterpriseDB installation of PostgreSQL, your log files will be in /Library/PostgreSQL/8.4/data/pg_log

Of course, you'll want to substitute 8.4 for whichever version number you're running.

Jeremiah Peschka
Found it. Thanks
Xan