diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-20 14:19:21 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-20 14:19:21 -0800 |
commit | cb6ccadcebf92dc41c774e961db3e559e26d4945 (patch) | |
tree | f875833136f411e7e0eb27faea069c6de572190d /railties/lib | |
parent | a0da46ecaf354a5b95210e11a4b7aba90a1d7383 (diff) | |
download | rails-cb6ccadcebf92dc41c774e961db3e559e26d4945.tar.gz rails-cb6ccadcebf92dc41c774e961db3e559e26d4945.tar.bz2 rails-cb6ccadcebf92dc41c774e961db3e559e26d4945.zip |
broadcasting to the console and remove file tailing middleware
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/commands/server.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb index ea774eb16c..0b757cbe28 100644 --- a/railties/lib/rails/commands/server.rb +++ b/railties/lib/rails/commands/server.rb @@ -67,6 +67,13 @@ module Rails FileUtils.mkdir_p(Rails.root.join('tmp', dir_to_make)) end + unless options[:daemonize] + wrapped_app # touch the app so the logger is set up + + console = ActiveSupport::Logger.new($stdout) + Rails.logger.extend(ActiveSupport::Logger.broadcast(console)) + end + super ensure # The '-h' option calls exit before @options is set. @@ -76,7 +83,6 @@ module Rails def middleware middlewares = [] - middlewares << [Rails::Rack::LogTailer, log_path] unless options[:daemonize] middlewares << [Rails::Rack::Debugger] if options[:debugger] middlewares << [::Rack::ContentLength] Hash.new(middlewares) |