Permalink
Browse files

The failsafe middleware should flush the logger upon logging the erro…

…r, otherwise nothing will be written to the log file.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
  • Loading branch information...
1 parent f32c96e commit 1012dec88fcaf084d76f4ec19092de1461dee486 @FooBarWidget FooBarWidget committed with NZKoz Dec 15, 2009
Showing with 1 addition and 0 deletions.
  1. +1 −0 actionpack/lib/action_controller/failsafe.rb
@@ -73,6 +73,7 @@ def log_failsafe_exception(exception)
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

0 comments on commit 1012dec

Please sign in to comment.