Created
January 3, 2014 19:32
-
-
Save austenito/8244857 to your computer and use it in GitHub Desktop.
Logging Mongodb queries in rails console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if Moped.logger == Rails.logger | |
Moped.logger = Logger.new($stdout) | |
true | |
else | |
Moped.logger = Rails.logger | |
false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment