diff options
author | Felix Bùˆnemann <buenemann@louis.info> | 2012-02-10 21:59:58 +0100 |
---|---|---|
committer | Felix Bùˆnemann <buenemann@louis.info> | 2012-02-23 00:32:55 +0100 |
commit | 0f3d426a16037d968f12a73b86c798def0588073 (patch) | |
tree | 28b1f4838313f3c08a3c79b7dc0a27ecd056960a /railties/lib | |
parent | 5497432d71b88ae4b99c6c59199eba95d81f28f6 (diff) | |
download | rails-0f3d426a16037d968f12a73b86c798def0588073.tar.gz rails-0f3d426a16037d968f12a73b86c798def0588073.tar.bz2 rails-0f3d426a16037d968f12a73b86c798def0588073.zip |
Make log autoflushing configurable
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application/bootstrap.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb index efc7dca0d4..93a0fba10b 100644 --- a/railties/lib/rails/application/bootstrap.rb +++ b/railties/lib/rails/application/bootstrap.rb @@ -30,7 +30,7 @@ module Rails f = File.open path, 'a' f.binmode - f.sync = true # make sure every write flushes + f.sync = config.autoflush_log # if true make sure every write flushes logger = ActiveSupport::TaggedLogging.new( ActiveSupport::Logger.new(f) diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 0297c41274..3144e1d3cb 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -5,7 +5,7 @@ require 'rails/engine/configuration' module Rails class Application class Configuration < ::Rails::Engine::Configuration - attr_accessor :allow_concurrency, :asset_host, :asset_path, :assets, + attr_accessor :allow_concurrency, :asset_host, :asset_path, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :dependency_loading, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_tags, :preload_frameworks, @@ -41,6 +41,7 @@ module Rails @file_watcher = ActiveSupport::FileUpdateChecker @exceptions_app = nil @default_method_for_update = :put + @autoflush_log = !Rails.env.production? @assets = ActiveSupport::OrderedOptions.new @assets.enabled = false |