Adrien Rey-Jarthon
Adrien Rey-Jarthon

Reputation: 1164

Ununderstandable Rails 3.0 log

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!

Upvotes: 1

Views: 508

Answers (1)

Jesus Leier
Jesus Leier

Reputation: 38

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.

Upvotes: 2

Related Questions