Skip to content

Instantly share code, notes, and snippets.

@edbond
Created November 2, 2010 13:33
Show Gist options
  • Save edbond/659612 to your computer and use it in GitHub Desktop.
Save edbond/659612 to your computer and use it in GitHub Desktop.
Reset rails logging in script/console, redirect to console
logger = Logger.new(STDOUT)
logger.level = Logger::DEBUG
RAILS_DEFAULT_LOGGER = logger
ActiveRecord::Base.logger = logger
ActionController::Base.logger = logger
ActiveSupport::Cache::MemCacheStore.logger = logger
ApplicationController.allow_forgery_protection = false
reload!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment