diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2011-10-19 12:59:33 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2011-10-19 12:59:33 -0500 |
commit | afde6fdd5ef3e6b0693a7e330777e85ef4cffddb (patch) | |
tree | e8cc45b642d1908a1768117eb343ee3bf99c5596 /railties/lib/rails/application | |
parent | 3a746f7c48936bac1c08dcf229c7c8fc74fdfc13 (diff) | |
download | rails-afde6fdd5ef3e6b0693a7e330777e85ef4cffddb.tar.gz rails-afde6fdd5ef3e6b0693a7e330777e85ef4cffddb.tar.bz2 rails-afde6fdd5ef3e6b0693a7e330777e85ef4cffddb.zip |
Added X-Request-Id tracking and TaggedLogging to easily log that and other production concerns
Diffstat (limited to 'railties/lib/rails/application')
-rw-r--r-- | railties/lib/rails/application/bootstrap.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb index 0aff05b681..c2cb121e42 100644 --- a/railties/lib/rails/application/bootstrap.rb +++ b/railties/lib/rails/application/bootstrap.rb @@ -24,12 +24,12 @@ module Rails initializer :initialize_logger, :group => :all do Rails.logger ||= config.logger || begin path = config.paths["log"].first - logger = ActiveSupport::BufferedLogger.new(path) + logger = ActiveSupport::TaggedLogging.new(ActiveSupport::BufferedLogger.new(path)) logger.level = ActiveSupport::BufferedLogger.const_get(config.log_level.to_s.upcase) logger.auto_flushing = false if Rails.env.production? logger rescue StandardError - logger = ActiveSupport::BufferedLogger.new(STDERR) + logger = ActiveSupport::TaggedLogging.new(ActiveSupport::BufferedLogger.new(STDERR)) logger.level = ActiveSupport::BufferedLogger::WARN logger.warn( "Rails Error: Unable to access log file. Please ensure that #{path} exists and is chmod 0666. " + diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 448521d2f0..8f5b28faf8 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -8,7 +8,7 @@ module Rails attr_accessor :allow_concurrency, :asset_host, :asset_path, :assets, :cache_classes, :cache_store, :consider_all_requests_local, :dependency_loading, :filter_parameters, - :force_ssl, :helpers_paths, :logger, :preload_frameworks, + :force_ssl, :helpers_paths, :logger, :log_tags, :preload_frameworks, :reload_plugins, :secret_token, :serve_static_assets, :ssl_options, :static_cache_control, :session_options, :time_zone, :whiny_nils |