README.md in mongodb_logger-0.6.1 vs README.md in mongodb_logger-0.6.2

- old
+ new

@@ -35,15 +35,17 @@ 1. Add the following line to your ApplicationController: include MongodbLogger::Base -1. For use with Heroku you need to prevent the rails\_log\_stdout plugin from being added by Heroku: +1. For use with Heroku you need to prevent the rails\_log\_stdout plugin from being added by Heroku for rails 3: mkdir vendor/plugins/rails_log_stdout touch vendor/plugins/rails_log_stdout/.gitkeep + For Rails 4 just remove from Gemfile "rails_12factor" rubygem. + 1. Add MongodbLogger settings to database.yml for each environment in which you want to use the MongodbLogger. The MongodbLogger will also look for a separate mongodb\_logger.yml or mongoid.yml (if you are using mongoid) before looking in database.yml. In the mongodb\_logger.yml and mongoid.yml case, the settings should be defined without the 'mongodb\_logger' subkey. database.yml: @@ -155,9 +157,21 @@ # do something with this data, for example - send email (better - by background job) end end In this callback send record without "\_id", because logger not wait for insert response from MongoDB. + +## Disable mongodb_logger + +To disable MongodbLogger you can use option disable. But this should be set before rails load (for example in Rails app the top of "config/application.rb"): + + MongodbLogger::Base.configure do |config| + config.disable = true + end + +or + + MongodbLogger::Base.disable = true ## Migrate to another size of capped collection If you need change capper collection size, you should change the "capsize" key in mongodb\_config and run this task for migration: