Nat*_*don 9 ruby logging sequel
默认的Ruby Sequel行为是在INFO级别记录所有数据库查询(与在DEBUG级别记录的ActiveRecord不同).我该如何改变?
Jer*_*ans 21
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
Run Code Online (Sandbox Code Playgroud)
Which will use the debug method instead of the info method when logging queries.