diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-01-13 20:39:51 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-01-13 20:39:51 +0000 |
commit | 4b7091f32af7841b2d6d7cbef47d3849f48786c0 (patch) | |
tree | e5a6cd335eadc9f090164b154e3e5cffa8ad6890 /railties/lib | |
parent | 7e1c04d86691075d172bccb8bc1c7df2e71383c3 (diff) | |
download | rails-4b7091f32af7841b2d6d7cbef47d3849f48786c0.tar.gz rails-4b7091f32af7841b2d6d7cbef47d3849f48786c0.tar.bz2 rails-4b7091f32af7841b2d6d7cbef47d3849f48786c0.zip |
Use non-blocking writing if available. Closes #10794 [lifofifo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8638 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/initializer.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index c3056c196d..899688b559 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -250,7 +250,10 @@ module Rails begin logger = ActiveSupport::BufferedLogger.new(configuration.log_path) logger.level = ActiveSupport::BufferedLogger.const_get(configuration.log_level.to_s.upcase) - logger.auto_flushing = false if configuration.environment == "production" + if configuration.environment == "production" + logger.auto_flushing = false + logger.set_non_blocking_io + end rescue StandardError =>e logger = ActiveSupport::BufferedLogger.new(STDERR) logger.level = ActiveSupport::BufferedLogger::WARN |