Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make log autoflushing configurable

  • Loading branch information...
commit 0f3d426a16037d968f12a73b86c798def0588073 1 parent 5497432
@felixbuenemann felixbuenemann authored
View
2  railties/lib/rails/application/bootstrap.rb
@@ -30,7 +30,7 @@ module Bootstrap
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)
View
3  railties/lib/rails/application/configuration.rb
@@ -5,7 +5,7 @@
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 @@ def initialize(*)
@file_watcher = ActiveSupport::FileUpdateChecker
@exceptions_app = nil
@default_method_for_update = :put
+ @autoflush_log = !Rails.env.production?
@assets = ActiveSupport::OrderedOptions.new
@assets.enabled = false
Please sign in to comment.
Something went wrong with that request. Please try again.