Skip to content

Instantly share code, notes, and snippets.

@lifo
Created September 13, 2008 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lifo/10603 to your computer and use it in GitHub Desktop.
Save lifo/10603 to your computer and use it in GitHub Desktop.
class ActionController::Base
alias_method_chain :render, :log
def render_with_log(*args)
old, ActiveRecord::Base.logger = ActiveRecord::Base.logger, ActiveSupport::BufferedLogger.new("fucked_up.log")
render_without_log(args)
ensure
ActiveRecord::Base.logger = old
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment