From cb6ccadcebf92dc41c774e961db3e559e26d4945 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 20 Jan 2012 14:19:21 -0800 Subject: broadcasting to the console and remove file tailing middleware --- railties/lib/rails/commands/server.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'railties/lib') 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) -- cgit v1.2.3