Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 1000
NatGordon Avatar asked Oct 05 '10 17:10

NatGordon


1 Answers

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.

like image 188
Jeremy Evans Avatar answered Oct 07 '22 01:10

Jeremy Evans