Ticket #8665: remove_logger_init_and_touch_log_before_tailing.diff
| File remove_logger_init_and_touch_log_before_tailing.diff, 1.1 kB (added by atnan, 6 months ago) |
|---|
-
railties/lib/commands/servers/mongrel.rb
old new 34 34 35 35 puts "=> Rails application starting on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}" 36 36 37 parameters = [ 38 "start", 39 "-p", OPTIONS[:port].to_s, 40 "-a", OPTIONS[:ip].to_s, 37 parameters = [ 38 "start", 39 "-p", OPTIONS[:port].to_s, 40 "-a", OPTIONS[:ip].to_s, 41 41 "-e", OPTIONS[:environment], 42 42 "-P", "#{RAILS_ROOT}/tmp/pids/mongrel.pid" 43 43 ] … … 50 50 51 51 start_debugger if OPTIONS[:debugger] 52 52 53 require 'initializer'54 Rails::Initializer.run(:initialize_logger)55 56 53 puts "=> Call with -d to detach" 57 54 puts "=> Ctrl-C to shutdown server" 58 tail_thread = tail(Pathname.new("#{File.expand_path(RAILS_ROOT)}/log/#{RAILS_ENV}.log").cleanpath)59 55 56 log = Pathname.new("#{File.expand_path(RAILS_ROOT)}/log/#{RAILS_ENV}.log").cleanpath 57 open(log, (File::WRONLY | File::APPEND | File::CREAT)) unless File.exist? log 58 tail_thread = tail(log) 59 60 60 trap(:INT) { exit } 61 61 62 62 begin