From 7321e7e02ee141519f320c0f46cc3b5fe263f61d Mon Sep 17 00:00:00 2001 From: Hongli Lai (Phusion) Date: Tue, 15 Dec 2009 11:52:53 -0800 Subject: [PATCH] The failsafe middleware should flush the logger upon logging the error, otherwise nothing will be written to the log file. --- actionpack/lib/action_controller/failsafe.rb | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/actionpack/lib/action_controller/failsafe.rb b/actionpack/lib/action_controller/failsafe.rb index 7f8aee8..42ec570 100644 --- a/actionpack/lib/action_controller/failsafe.rb +++ b/actionpack/lib/action_controller/failsafe.rb @@ -73,6 +73,7 @@ module ActionController message = "/!\\ FAILSAFE /!\\ #{Time.now}\n Status: 500 Internal Server Error\n" message << " #{exception}\n #{exception.backtrace.join("\n ")}" if exception failsafe_logger.fatal(message) + failsafe_logger.flush if failsafe_logger.respond_to?(:flush) end def failsafe_logger -- 1.6.5.1