views:

77

answers:

1

Hi, since i migrated to rails 3.0, logs are now filled with queries like this:

 SQL (8.5ms)   SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
 FROM pg_attribute a LEFT JOIN pg_attrdef d
 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
 WHERE a.attrelid = '"checkins"'::regclass
 AND a.attnum > 0 AND NOT a.attisdropped
 ORDER BY a.attnum
  SQL (0.7ms)   SELECT COUNT(*)
 FROM pg_tables
 WHERE tablename = 'checkins'

it look like some Postgresql system query, but the log is really unreadable now, i have to scroll through hundred of lines like this to find what i want. is there a reason? is there a way to get the same logging as rails 2? I can't manage to find anything about it on google. Thank you!

+1  A: 

You might want to have a look at http://github.com/dolzenko/silent-postgres That plugin strips those queries out. Those log noise occurs because of the high postgresql log level.

Jesus Leier
This is exactly what i was looking for, but i didn't thank it can be a plugin. I was searching for rails logger obscure options. Thanks a lot!
BigBourin