diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-03-02 13:05:25 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-03-02 13:05:25 -0800 |
commit | c2dbc391a9292e6f73cadce2f0ba1be871b29e82 (patch) | |
tree | 3956dbc83c4d87a2e889017fd14883e1ef6285da /railties/lib/rails/application | |
parent | d434c5406846fb280b8a9d6ec40247b1f1b464c6 (diff) | |
download | rails-c2dbc391a9292e6f73cadce2f0ba1be871b29e82.tar.gz rails-c2dbc391a9292e6f73cadce2f0ba1be871b29e82.tar.bz2 rails-c2dbc391a9292e6f73cadce2f0ba1be871b29e82.zip |
Have log subscribers subscribe to the actual events, so the subscriber doesn't subscribe to *every* event, so we can have events that are slow-ish but are not actually run in production.
Diffstat (limited to 'railties/lib/rails/application')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index d6ad045294..a00f9c43ae 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -5,7 +5,7 @@ module Rails class Configuration < ::Rails::Engine::Configuration include ::Rails::Configuration::Deprecated - attr_accessor :allow_concurrency, :cache_classes, :cache_store, :colorize_logging, + attr_accessor :allow_concurrency, :cache_classes, :cache_store, :consider_all_requests_local, :dependency_loading, :filter_parameters, :log_level, :logger, :metals, :plugins, :preload_frameworks, :reload_engines, :reload_plugins, @@ -14,7 +14,6 @@ module Rails def initialize(*) super @allow_concurrency = false - @colorize_logging = true @filter_parameters = [] @dependency_loading = true @serve_static_assets = true @@ -81,6 +80,16 @@ module Rails def log_level @log_level ||= Rails.env.production? ? :info : :debug end + + def colorize_logging + @colorize_logging + end + + def colorize_logging=(val) + @colorize_logging = val + Rails::LogSubscriber.colorize_logging = val + self.generators.colorize_logging = val + end end end end
\ No newline at end of file |