Undefined method `level` for Mongoid logger in a Rails app-Collection of common programming errors
I think the issue here may be where you are initiating the Mongoid.logger
and how you are doing it. In my Rails 3.2
app running Ruby 1.9.2
with Mongoid 2.4.3
I have no problem instantiating the Mongoid Logger
.
Here you can read the Mongoid Configuration that shows how to setup the logger.
The code from my most recent app to instantiate the logger in Application.rb
found in the /config
folder
module Application_Name
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
config.mongoid.logger = Logger.new($stdout)
Originally posted 2013-11-09 19:03:02.