-
-
Save andreif/1103816 to your computer and use it in GitHub Desktop.
.irbrc for logging goodies like SQL/Mongo queries to $stdout if in Rails 3 console
This file contains 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
# .irbrc to log goodies like SQL/Mongo queries to $stdout if in Rails 3 console | |
if defined?(Rails) && Rails.respond_to?(:logger) | |
require 'logger' | |
Rails.logger = Logger.new($stdout) | |
if defined?(Mongoid) | |
Mongoid.logger = Rails.logger | |
end | |
end |
Author
andreif
commented
Jul 25, 2011
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment