Last active
July 24, 2018 07:27
-
-
Save flanker/c24af4bae7159593ac5b3ae32efce06a to your computer and use it in GitHub Desktop.
Show Mongoid and Active Record logs in Rails 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
Mongoid.logger.level = Logger::DEBUG | |
Mongo::Logger.logger.level = Logger::DEBUG | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
Mongoid.logger = Logger.new(STDOUT) | |
Mongo::Logger.logger = Logger.new(STDOUT) | |
# limit of mongoid log truncated | |
Mongo::Monitoring::CommandLogSubscriber::LOG_STRING_LIMIT = 3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment