开发者

How do I set Ruby Sequel logging to the DEBUG level?

The default Ruby Sequel behaviour is to log all DB 开发者_开发百科queries at the INFO level (unlike ActiveRecord which logs at the DEBUG level). How do I change this?


Previously, it was fairly simple to do with a proxy logger object, but enough people have asked for this that I implemented it. With the git master branch of Sequel, you can now do:

DB.sql_log_level = :debug

Which will use the debug method instead of the info method when logging queries.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜