aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/server.rb
diff options
context:
space:
mode:
authorJosé Valim and Mikel Lindsaar <raasdnil@gmail.com>2010-01-22 13:37:29 +1100
committerJosé Valim and Mikel Lindsaar <raasdnil@gmail.com>2010-01-22 13:37:29 +1100
commit8a6a2ca712601a28087f78fb6080b05f526cb0fd (patch)
treede9347d6a398a4317e0c87981e8c75d442e141d7 /railties/lib/rails/commands/server.rb
parentc9dc1ac95bc97800dd3deb82fe1cf6f98e27413d (diff)
parent6d30002a52133bd105adb29084f4cc72b1ee847f (diff)
downloadrails-8a6a2ca712601a28087f78fb6080b05f526cb0fd.tar.gz
rails-8a6a2ca712601a28087f78fb6080b05f526cb0fd.tar.bz2
rails-8a6a2ca712601a28087f78fb6080b05f526cb0fd.zip
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'railties/lib/rails/commands/server.rb')
-rw-r--r--railties/lib/rails/commands/server.rb11
1 files changed, 1 insertions, 10 deletions
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb
index 115499db05..b21ae2a17b 100644
--- a/railties/lib/rails/commands/server.rb
+++ b/railties/lib/rails/commands/server.rb
@@ -46,7 +46,6 @@ module Rails
trap(:INT) { exit }
puts "=> Ctrl-C to shutdown server" unless options[:daemonize]
- initialize_log_tailer! unless options[:daemonize]
super
ensure
puts 'Exiting' unless options[:daemonize]
@@ -54,6 +53,7 @@ module Rails
def middleware
middlewares = []
+ middlewares << [Rails::Rack::LogTailer, log_path] unless options[:daemonize]
middlewares << [Rails::Rack::Debugger] if options[:debugger]
Hash.new(middlewares)
end
@@ -71,14 +71,5 @@ module Rails
:pid => "tmp/pids/server.pid"
})
end
-
- protected
-
- # LogTailer should not be used as a middleware since the logging happens
- # async in a request and the middleware calls are sync. So we send it
- # to subscriber which will be responsible for calling tail! in the log tailer.
- def initialize_log_tailer!
- Rails::Subscriber.log_tailer = Rails::Rack::LogTailer.new(nil, log_path)
- end
end
end