如何从日志中删除Postgres“PK和序列序列”?

时间:2011-08-25 14:29:59

标签: postgresql activerecord

我在Postgres的项目中使用ActiveRecord,我的日志中充满了这条日志消息。我想在开发过程中将日志文件保持在调试模式。有没有办法让这个特别警告沉默?我已经使用silent-postgres宝石来沉默一堆其他的东西(如this answer推荐的那样,但它对这种情况没有帮助)。谢谢!

D, [2011-08-25T10:22:10.530123 #78199] DEBUG -- :   PK and serial sequence (1.7ms)   SELECT attr.attname, seq.relname
FROM pg_class seq,
pg_attribute attr,
pg_depend dep,
pg_namespace name,
pg_constraint cons
WHERE seq.oid = dep.objid
AND seq.relkind = 'S'
AND attr.attrelid = dep.refobjid
AND attr.attnum = dep.refobjsubid
AND attr.attrelid = cons.conrelid
AND attr.attnum = cons.conkey[1]
AND cons.contype = 'p'
AND dep.refobjid = '"calls"'::regclass

1 个答案:

答案 0 :(得分:2)

对我来说,沉默的postgres宝石确实解决了这个问题。 OP提出问题后,或许它得到了加强?