Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

broadcasting to the console and remove file tailing middleware

  • Loading branch information...
commit cb6ccadcebf92dc41c774e961db3e559e26d4945 1 parent a0da46e
Aaron Patterson tenderlove authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 railties/lib/rails/commands/server.rb
8 railties/lib/rails/commands/server.rb
View
@@ -67,6 +67,13 @@ def start
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 @@ def start
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)
Please sign in to comment.
Something went wrong with that request. Please try again.