Skip to content

Instantly share code, notes, and snippets.

@davidyang
Created February 8, 2010 08:09
Show Gist options
  • Save davidyang/297978 to your computer and use it in GitHub Desktop.
Save davidyang/297978 to your computer and use it in GitHub Desktop.
def initialize_framework_logging
for framework in ([ :active_record, :action_controller, :action_mailer ] & configuration.frameworks)
framework.to_s.camelize.constantize.const_get("Base").logger ||= Rails.logger
end
ActiveSupport::Dependencies.logger ||= Rails.logger
Rails.cache.logger ||= Rails.logger
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment